<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998


Desugaring expressions.
-}</span><span>
</span><span id="line-8"></span><span>
</span><span id="line-9"></span><span class="hs-pragma">{-# LANGUAGE CPP, MultiWayIf #-}</span><span>
</span><span id="line-10"></span><span class="hs-pragma">{-# LANGUAGE TypeFamilies #-}</span><span>
</span><span id="line-11"></span><span class="hs-pragma">{-# LANGUAGE ViewPatterns #-}</span><span>
</span><span id="line-12"></span><span>
</span><span id="line-13"></span><span class="hs-pragma">{-# OPTIONS_GHC -Wno-incomplete-uni-patterns   #-}</span><span>
</span><span id="line-14"></span><span class="hs-pragma">{-# OPTIONS_GHC -Wno-incomplete-record-updates #-}</span><span>
</span><span id="line-15"></span><span>
</span><span id="line-16"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.HsToCore.Expr</span><span>
</span><span id="line-17"></span><span>   </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier">dsExpr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier">dsLExpr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsLExprNoLP"><span class="hs-identifier">dsLExprNoLP</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsLocalBinds"><span class="hs-identifier">dsLocalBinds</span></a></span><span>
</span><span id="line-18"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsValBinds"><span class="hs-identifier">dsValBinds</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.HsToCore.Match.Literal.html#dsLit"><span class="hs-identifier">dsLit</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsSyntaxExpr"><span class="hs-identifier">dsSyntaxExpr</span></a></span><span>
</span><span id="line-19"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsHandleMonadicFailure"><span class="hs-identifier">dsHandleMonadicFailure</span></a></span><span>
</span><span id="line-20"></span><span>   </span><span class="hs-special">)</span><span>
</span><span id="line-21"></span><span class="hs-keyword">where</span><span class="hs-cpp">

#include &quot;HsVersions.h&quot;
</span><span>
</span><span id="line-25"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-26"></span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.HsToCore.Match.html"><span class="hs-identifier">GHC.HsToCore.Match</span></a></span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.HsToCore.Match.Literal.html"><span class="hs-identifier">GHC.HsToCore.Match.Literal</span></a></span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.HsToCore.Binds.html"><span class="hs-identifier">GHC.HsToCore.Binds</span></a></span><span>
</span><span id="line-30"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.HsToCore.GuardedRHSs.html"><span class="hs-identifier">GHC.HsToCore.GuardedRHSs</span></a></span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.HsToCore.ListComp.html"><span class="hs-identifier">GHC.HsToCore.ListComp</span></a></span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.HsToCore.Utils.html"><span class="hs-identifier">GHC.HsToCore.Utils</span></a></span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.HsToCore.Arrows.html"><span class="hs-identifier">GHC.HsToCore.Arrows</span></a></span><span>
</span><span id="line-34"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.HsToCore.Monad.html"><span class="hs-identifier">GHC.HsToCore.Monad</span></a></span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.HsToCore.PmCheck.html"><span class="hs-identifier">GHC.HsToCore.PmCheck</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.HsToCore.PmCheck.html#addTyCsDs"><span class="hs-identifier">addTyCsDs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.HsToCore.PmCheck.html#checkGuardMatches"><span class="hs-identifier">checkGuardMatches</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-36"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.html"><span class="hs-identifier">GHC.Types.Name</span></a></span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.Env.html"><span class="hs-identifier">GHC.Types.Name.Env</span></a></span><span>
</span><span id="line-38"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.FamInstEnv.html"><span class="hs-identifier">GHC.Core.FamInstEnv</span></a></span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Core.FamInstEnv.html#topNormaliseType"><span class="hs-identifier">topNormaliseType</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-39"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.HsToCore.Quote.html"><span class="hs-identifier">GHC.HsToCore.Quote</span></a></span><span>
</span><span id="line-40"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Hs.html"><span class="hs-identifier">GHC.Hs</span></a></span><span>
</span><span id="line-41"></span><span>
</span><span id="line-42"></span><span class="hs-comment">-- NB: The desugarer, which straddles the source and Core worlds, sometimes</span><span>
</span><span id="line-43"></span><span class="hs-comment">--     needs to see source types</span><span>
</span><span id="line-44"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Tc.Utils.TcType.html"><span class="hs-identifier">GHC.Tc.Utils.TcType</span></a></span><span>
</span><span id="line-45"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Tc.Types.Evidence.html"><span class="hs-identifier">GHC.Tc.Types.Evidence</span></a></span><span>
</span><span id="line-46"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Tc.Utils.Monad.html"><span class="hs-identifier">GHC.Tc.Utils.Monad</span></a></span><span>
</span><span id="line-47"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Type.html"><span class="hs-identifier">GHC.Core.Type</span></a></span><span>
</span><span id="line-48"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Multiplicity.html"><span class="hs-identifier">GHC.Core.Multiplicity</span></a></span><span>
</span><span id="line-49"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Coercion.html"><span class="hs-identifier">GHC.Core.Coercion</span></a></span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Coercion"><span class="hs-identifier">Coercion</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.html"><span class="hs-identifier">GHC.Core</span></a></span><span>
</span><span id="line-51"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Utils.html"><span class="hs-identifier">GHC.Core.Utils</span></a></span><span>
</span><span id="line-52"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Make.html"><span class="hs-identifier">GHC.Core.Make</span></a></span><span>
</span><span id="line-53"></span><span>
</span><span id="line-54"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html"><span class="hs-identifier">GHC.Driver.Session</span></a></span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.CostCentre.html"><span class="hs-identifier">GHC.Types.CostCentre</span></a></span><span>
</span><span id="line-56"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Id.html"><span class="hs-identifier">GHC.Types.Id</span></a></span><span>
</span><span id="line-57"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html"><span class="hs-identifier">GHC.Types.Id.Make</span></a></span><span>
</span><span id="line-58"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html"><span class="hs-identifier">GHC.Types.Var.Env</span></a></span><span>
</span><span id="line-59"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Unit.Module.html"><span class="hs-identifier">GHC.Unit.Module</span></a></span><span>
</span><span id="line-60"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.ConLike.html"><span class="hs-identifier">GHC.Core.ConLike</span></a></span><span>
</span><span id="line-61"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html"><span class="hs-identifier">GHC.Core.DataCon</span></a></span><span>
</span><span id="line-62"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Ppr.html"><span class="hs-identifier">GHC.Core.TyCo.Ppr</span></a></span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Ppr.html#pprWithTYPE"><span class="hs-identifier">pprWithTYPE</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-63"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Builtin.Types.html"><span class="hs-identifier">GHC.Builtin.Types</span></a></span><span>
</span><span id="line-64"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Builtin.Names.html"><span class="hs-identifier">GHC.Builtin.Names</span></a></span><span>
</span><span id="line-65"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html"><span class="hs-identifier">GHC.Types.Basic</span></a></span><span>
</span><span id="line-66"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.Maybe.html"><span class="hs-identifier">GHC.Data.Maybe</span></a></span><span>
</span><span id="line-67"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html"><span class="hs-identifier">GHC.Types.SrcLoc</span></a></span><span>
</span><span id="line-68"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>
</span><span id="line-69"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.Bag.html"><span class="hs-identifier">GHC.Data.Bag</span></a></span><span>
</span><span id="line-70"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Outputable</span></span><span>
</span><span id="line-71"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.PatSyn.html"><span class="hs-identifier">GHC.Core.PatSyn</span></a></span><span>
</span><span id="line-72"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.html#"><span class="hs-identifier">Control.Monad</span></a></span><span>
</span><span id="line-73"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.List.NonEmpty.html#"><span class="hs-identifier">Data.List.NonEmpty</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/Data.List.NonEmpty.html#nonEmpty"><span class="hs-identifier">nonEmpty</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-74"></span><span>
</span><span id="line-75"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.LanguageExtensions.html#"><span class="hs-identifier">GHC.LanguageExtensions</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">LangExt</span></span><span>
</span><span id="line-76"></span><span>
</span><span id="line-77"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
                dsLocalBinds, dsValBinds
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-84"></span><span>
</span><span id="line-85"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsLocalBinds"><span class="hs-identifier hs-type">dsLocalBinds</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Binds.html#LHsLocalBinds"><span class="hs-identifier hs-type">LHsLocalBinds</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#DsM"><span class="hs-identifier hs-type">DsM</span></a></span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span>
</span><span id="line-86"></span><span id="dsLocalBinds"><span class="annot"><span class="annottext">dsLocalBinds :: LHsLocalBinds GhcTc -&gt; CoreExpr -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLocalBinds"><span class="hs-identifier hs-var hs-var">dsLocalBinds</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Binds.html#EmptyLocalBinds"><span class="hs-identifier hs-type">EmptyLocalBinds</span></a></span><span> </span><span class="annot"><span class="annottext">XEmptyLocalBinds GhcTc GhcTc
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>  </span><span id="local-6989586621681141706"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141706"><span class="hs-identifier hs-var">body</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; DsM CoreExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141706"><span class="hs-identifier hs-var">body</span></a></span><span>
</span><span id="line-87"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsLocalBinds"><span class="hs-identifier hs-var">dsLocalBinds</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681141705"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681141705"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Binds.html#HsValBinds"><span class="hs-identifier hs-type">HsValBinds</span></a></span><span> </span><span class="annot"><span class="annottext">XHsValBinds GhcTc GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141703"><span class="annot"><span class="annottext">HsValBindsLR GhcTc GhcTc
</span><a href="#local-6989586621681141703"><span class="hs-identifier hs-var">binds</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span id="local-6989586621681141702"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141702"><span class="hs-identifier hs-var">body</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SrcSpan -&gt; DsM CoreExpr -&gt; DsM CoreExpr
forall a. SrcSpan -&gt; DsM a -&gt; DsM a
</span><a href="GHC.HsToCore.Monad.html#putSrcSpanDs"><span class="hs-identifier hs-var">putSrcSpanDs</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681141705"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">(DsM CoreExpr -&gt; DsM CoreExpr) -&gt; DsM CoreExpr -&gt; DsM CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-88"></span><span>                                                 </span><span class="annot"><span class="annottext">HsValBindsLR GhcTc GhcTc -&gt; CoreExpr -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsValBinds"><span class="hs-identifier hs-var">dsValBinds</span></a></span><span> </span><span class="annot"><span class="annottext">HsValBindsLR GhcTc GhcTc
</span><a href="#local-6989586621681141703"><span class="hs-identifier hs-var">binds</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141702"><span class="hs-identifier hs-var">body</span></a></span><span>
</span><span id="line-89"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsLocalBinds"><span class="hs-identifier hs-var">dsLocalBinds</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Binds.html#HsIPBinds"><span class="hs-identifier hs-type">HsIPBinds</span></a></span><span> </span><span class="annot"><span class="annottext">XHsIPBinds GhcTc GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141699"><span class="annot"><span class="annottext">HsIPBinds GhcTc
</span><a href="#local-6989586621681141699"><span class="hs-identifier hs-var">binds</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>    </span><span id="local-6989586621681141698"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141698"><span class="hs-identifier hs-var">body</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsIPBinds GhcTc -&gt; CoreExpr -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsIPBinds"><span class="hs-identifier hs-var">dsIPBinds</span></a></span><span>  </span><span class="annot"><span class="annottext">HsIPBinds GhcTc
</span><a href="#local-6989586621681141699"><span class="hs-identifier hs-var">binds</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141698"><span class="hs-identifier hs-var">body</span></a></span><span>
</span><span id="line-90"></span><span>
</span><span id="line-91"></span><span class="hs-comment">-------------------------</span><span>
</span><span id="line-92"></span><span class="hs-comment">-- caller sets location</span><span>
</span><span id="line-93"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsValBinds"><span class="hs-identifier hs-type">dsValBinds</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Binds.html#HsValBinds"><span class="hs-identifier hs-type">HsValBinds</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#DsM"><span class="hs-identifier hs-type">DsM</span></a></span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span>
</span><span id="line-94"></span><span id="dsValBinds"><span class="annot"><span class="annottext">dsValBinds :: HsValBindsLR GhcTc GhcTc -&gt; CoreExpr -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsValBinds"><span class="hs-identifier hs-var hs-var">dsValBinds</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Binds.html#XValBindsLR"><span class="hs-identifier hs-type">XValBindsLR</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Binds.html#NValBinds"><span class="hs-identifier hs-type">NValBinds</span></a></span><span> </span><span id="local-6989586621681141693"><span class="annot"><span class="annottext">[(RecFlag, LHsBinds GhcTc)]
</span><a href="#local-6989586621681141693"><span class="hs-identifier hs-var">binds</span></a></span></span><span> </span><span class="annot"><span class="annottext">[LSig GhcRn]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span id="local-6989586621681141692"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141692"><span class="hs-identifier hs-var">body</span></a></span></span><span>
</span><span id="line-95"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((RecFlag, LHsBinds GhcTc) -&gt; CoreExpr -&gt; DsM CoreExpr)
-&gt; CoreExpr -&gt; [(RecFlag, LHsBinds GhcTc)] -&gt; DsM CoreExpr
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Foldable t, Monad m) =&gt;
(a -&gt; b -&gt; m b) -&gt; b -&gt; t a -&gt; m b
</span><a href="../../base/src/Data.Foldable.html#foldrM"><span class="hs-identifier hs-var">foldrM</span></a></span><span> </span><span class="annot"><span class="annottext">(RecFlag, LHsBinds GhcTc) -&gt; CoreExpr -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#ds_val_bind"><span class="hs-identifier hs-var">ds_val_bind</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141692"><span class="hs-identifier hs-var">body</span></a></span><span> </span><span class="annot"><span class="annottext">[(RecFlag, LHsBinds GhcTc)]
</span><a href="#local-6989586621681141693"><span class="hs-identifier hs-var">binds</span></a></span><span>
</span><span id="line-96"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsValBinds"><span class="hs-identifier hs-var">dsValBinds</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Binds.html#ValBinds"><span class="hs-identifier hs-type">ValBinds</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>       </span><span class="annot"><span class="annottext">CoreExpr
</span><span class="hs-identifier">_</span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; DsM CoreExpr
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dsValBinds ValBindsIn&quot;</span></span><span>
</span><span id="line-97"></span><span>
</span><span id="line-98"></span><span class="hs-comment">-------------------------</span><span>
</span><span id="line-99"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsIPBinds"><span class="hs-identifier hs-type">dsIPBinds</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Binds.html#HsIPBinds"><span class="hs-identifier hs-type">HsIPBinds</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#DsM"><span class="hs-identifier hs-type">DsM</span></a></span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span>
</span><span id="line-100"></span><span id="dsIPBinds"><span class="annot"><span class="annottext">dsIPBinds :: HsIPBinds GhcTc -&gt; CoreExpr -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsIPBinds"><span class="hs-identifier hs-var hs-var">dsIPBinds</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Binds.html#IPBinds"><span class="hs-identifier hs-type">IPBinds</span></a></span><span> </span><span id="local-6989586621681141686"><span class="annot"><span class="annottext">XIPBinds GhcTc
</span><a href="#local-6989586621681141686"><span class="hs-identifier hs-var">ev_binds</span></a></span></span><span> </span><span id="local-6989586621681141685"><span class="annot"><span class="annottext">[LIPBind GhcTc]
</span><a href="#local-6989586621681141685"><span class="hs-identifier hs-var">ip_binds</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681141684"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141684"><span class="hs-identifier hs-var">body</span></a></span></span><span>
</span><span id="line-101"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>  </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681141683"><span class="annot"><span class="annottext">[CoreBind]
</span><a href="#local-6989586621681141683"><span class="hs-identifier hs-var">ds_binds</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TcEvBinds -&gt; DsM [CoreBind]
</span><a href="GHC.HsToCore.Binds.html#dsTcEvBinds"><span class="hs-identifier hs-var">dsTcEvBinds</span></a></span><span> </span><span class="annot"><span class="annottext">XIPBinds GhcTc
TcEvBinds
</span><a href="#local-6989586621681141686"><span class="hs-identifier hs-var">ev_binds</span></a></span><span>
</span><span id="line-102"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681141681"><span class="annot"><span class="annottext">inner :: CoreExpr
</span><a href="#local-6989586621681141681"><span class="hs-identifier hs-var hs-var">inner</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[CoreBind] -&gt; CoreExpr -&gt; CoreExpr
</span><a href="GHC.Core.Make.html#mkCoreLets"><span class="hs-identifier hs-var">mkCoreLets</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreBind]
</span><a href="#local-6989586621681141683"><span class="hs-identifier hs-var">ds_binds</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141684"><span class="hs-identifier hs-var">body</span></a></span><span>
</span><span id="line-103"></span><span>                </span><span class="hs-comment">-- The dict bindings may not be in</span><span>
</span><span id="line-104"></span><span>                </span><span class="hs-comment">-- dependency order; hence Rec</span><span>
</span><span id="line-105"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(LIPBind GhcTc -&gt; CoreExpr -&gt; DsM CoreExpr)
-&gt; CoreExpr -&gt; [LIPBind GhcTc] -&gt; DsM CoreExpr
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Foldable t, Monad m) =&gt;
(a -&gt; b -&gt; m b) -&gt; b -&gt; t a -&gt; m b
</span><a href="../../base/src/Data.Foldable.html#foldrM"><span class="hs-identifier hs-var">foldrM</span></a></span><span> </span><span class="annot"><span class="annottext">LIPBind GhcTc -&gt; CoreExpr -&gt; DsM CoreExpr
forall {l}. GenLocated l (IPBind GhcTc) -&gt; CoreExpr -&gt; DsM CoreExpr
</span><a href="#local-6989586621681141679"><span class="hs-identifier hs-var">ds_ip_bind</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141681"><span class="hs-identifier hs-var">inner</span></a></span><span> </span><span class="annot"><span class="annottext">[LIPBind GhcTc]
</span><a href="#local-6989586621681141685"><span class="hs-identifier hs-var">ip_binds</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-106"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-107"></span><span>    </span><span id="local-6989586621681141679"><span class="annot"><span class="annottext">ds_ip_bind :: GenLocated l (IPBind GhcTc) -&gt; CoreExpr -&gt; DsM CoreExpr
</span><a href="#local-6989586621681141679"><span class="hs-identifier hs-var hs-var">ds_ip_bind</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">l
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Binds.html#IPBind"><span class="hs-identifier hs-type">IPBind</span></a></span><span> </span><span class="annot"><span class="annottext">XCIPBind GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621681141675"><span class="annot"><span class="annottext">IdP GhcTc
</span><a href="#local-6989586621681141675"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681141674"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141674"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span id="local-6989586621681141673"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141673"><span class="hs-identifier hs-var">body</span></a></span></span><span>
</span><span id="line-108"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621681141672"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141672"><span class="hs-identifier hs-var">e'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier hs-var">dsLExpr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141674"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-109"></span><span>           </span><span class="annot"><span class="annottext">CoreExpr -&gt; DsM CoreExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreBind -&gt; CoreExpr -&gt; CoreExpr
forall b. Bind b -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#Let"><span class="hs-identifier hs-var">Let</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; CoreExpr -&gt; CoreBind
forall b. b -&gt; Expr b -&gt; Bind b
</span><a href="GHC.Core.html#NonRec"><span class="hs-identifier hs-var">NonRec</span></a></span><span> </span><span class="annot"><span class="annottext">Id
IdP GhcTc
</span><a href="#local-6989586621681141675"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141672"><span class="hs-identifier hs-var">e'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141673"><span class="hs-identifier hs-var">body</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-110"></span><span>
</span><span id="line-111"></span><span class="hs-comment">-------------------------</span><span>
</span><span id="line-112"></span><span class="hs-comment">-- caller sets location</span><span>
</span><span id="line-113"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#ds_val_bind"><span class="hs-identifier hs-type">ds_val_bind</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Basic.html#RecFlag"><span class="hs-identifier hs-type">RecFlag</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Binds.html#LHsBinds"><span class="hs-identifier hs-type">LHsBinds</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#DsM"><span class="hs-identifier hs-type">DsM</span></a></span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span>
</span><span id="line-114"></span><span class="hs-comment">-- Special case for bindings which bind unlifted variables</span><span>
</span><span id="line-115"></span><span class="hs-comment">-- We need to do a case right away, rather than building</span><span>
</span><span id="line-116"></span><span class="hs-comment">-- a tuple and doing selections.</span><span>
</span><span id="line-117"></span><span class="hs-comment">-- Silently ignore INLINE and SPECIALISE pragmas...</span><span>
</span><span id="line-118"></span><span id="ds_val_bind"><span class="annot"><span class="annottext">ds_val_bind :: (RecFlag, LHsBinds GhcTc) -&gt; CoreExpr -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#ds_val_bind"><span class="hs-identifier hs-var hs-var">ds_val_bind</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RecFlag
</span><a href="GHC.Types.Basic.html#NonRecursive"><span class="hs-identifier hs-var">NonRecursive</span></a></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681141668"><span class="annot"><span class="annottext">LHsBinds GhcTc
</span><a href="#local-6989586621681141668"><span class="hs-identifier hs-var">hsbinds</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681141667"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141667"><span class="hs-identifier hs-var">body</span></a></span></span><span>
</span><span id="line-119"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681141666"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681141666"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span id="local-6989586621681141665"><span class="annot"><span class="annottext">HsBind GhcTc
</span><a href="#local-6989586621681141665"><span class="hs-identifier hs-var">bind</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsBinds GhcTc -&gt; [LHsBindLR GhcTc GhcTc]
forall a. Bag a -&gt; [a]
</span><a href="GHC.Data.Bag.html#bagToList"><span class="hs-identifier hs-var">bagToList</span></a></span><span> </span><span class="annot"><span class="annottext">LHsBinds GhcTc
</span><a href="#local-6989586621681141668"><span class="hs-identifier hs-var">hsbinds</span></a></span><span>
</span><span id="line-120"></span><span>        </span><span class="hs-comment">-- Non-recursive, non-overloaded bindings only come in ones</span><span>
</span><span id="line-121"></span><span>        </span><span class="hs-comment">-- ToDo: in some bizarre case it's conceivable that there</span><span>
</span><span id="line-122"></span><span>        </span><span class="hs-comment">--       could be dict binds in the 'binds'.  (See the notes</span><span>
</span><span id="line-123"></span><span>        </span><span class="hs-comment">--       below.  Then pattern-match would fail.  Urk.)</span><span>
</span><span id="line-124"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">HsBind GhcTc -&gt; Bool
</span><a href="GHC.Hs.Utils.html#isUnliftedHsBind"><span class="hs-identifier hs-var">isUnliftedHsBind</span></a></span><span> </span><span class="annot"><span class="annottext">HsBind GhcTc
</span><a href="#local-6989586621681141665"><span class="hs-identifier hs-var">bind</span></a></span><span>
</span><span id="line-125"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SrcSpan -&gt; DsM CoreExpr -&gt; DsM CoreExpr
forall a. SrcSpan -&gt; DsM a -&gt; DsM a
</span><a href="GHC.HsToCore.Monad.html#putSrcSpanDs"><span class="hs-identifier hs-var">putSrcSpanDs</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681141666"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">(DsM CoreExpr -&gt; DsM CoreExpr) -&gt; DsM CoreExpr -&gt; DsM CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-126"></span><span>     </span><span class="hs-comment">-- see Note [Strict binds checks] in GHC.HsToCore.Binds</span><span>
</span><span id="line-127"></span><span>    </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">HsBind GhcTc -&gt; Bool
forall {idL} {idR}. HsBindLR idL idR -&gt; Bool
</span><a href="#local-6989586621681141662"><span class="hs-identifier hs-var">is_polymorphic</span></a></span><span> </span><span class="annot"><span class="annottext">HsBind GhcTc
</span><a href="#local-6989586621681141665"><span class="hs-identifier hs-var">bind</span></a></span><span>
</span><span id="line-128"></span><span>    </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Monad.html#errDsCoreExpr"><span class="hs-identifier hs-var">errDsCoreExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsBind GhcTc -&gt; SDoc
forall {a}. Outputable a =&gt; a -&gt; SDoc
</span><a href="#local-6989586621681141660"><span class="hs-identifier hs-var">poly_bind_err</span></a></span><span> </span><span class="annot"><span class="annottext">HsBind GhcTc
</span><a href="#local-6989586621681141665"><span class="hs-identifier hs-var">bind</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-129"></span><span>            </span><span class="hs-comment">-- data Ptr a = Ptr Addr#</span><span>
</span><span id="line-130"></span><span>            </span><span class="hs-comment">-- f x = let p@(Ptr y) = ... in ...</span><span>
</span><span id="line-131"></span><span>            </span><span class="hs-comment">-- Here the binding for 'p' is polymorphic, but does</span><span>
</span><span id="line-132"></span><span>            </span><span class="hs-comment">-- not mix with an unlifted binding for 'y'.  You should</span><span>
</span><span id="line-133"></span><span>            </span><span class="hs-comment">-- use a bang pattern.  #6078.</span><span>
</span><span id="line-134"></span><span>
</span><span id="line-135"></span><span>    </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">Bool
-&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
-&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsBind GhcTc -&gt; Bool
forall (p :: Pass). HsBind (GhcPass p) -&gt; Bool
</span><a href="GHC.Hs.Pat.html#looksLazyPatBind"><span class="hs-identifier hs-var">looksLazyPatBind</span></a></span><span> </span><span class="annot"><span class="annottext">HsBind GhcTc
</span><a href="#local-6989586621681141665"><span class="hs-identifier hs-var">bind</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IOEnv (Env DsGblEnv DsLclEnv) ()
 -&gt; IOEnv (Env DsGblEnv DsLclEnv) ())
-&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
-&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-136"></span><span>              </span><span class="annot"><span class="annottext">WarningFlag -&gt; SDoc -&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
</span><a href="GHC.HsToCore.Monad.html#warnIfSetDs"><span class="hs-identifier hs-var">warnIfSetDs</span></a></span><span> </span><span class="annot"><span class="annottext">WarningFlag
</span><a href="GHC.Driver.Flags.html#Opt_WarnUnbangedStrictPatterns"><span class="hs-identifier hs-var">Opt_WarnUnbangedStrictPatterns</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsBind GhcTc -&gt; SDoc
forall {a}. Outputable a =&gt; a -&gt; SDoc
</span><a href="#local-6989586621681141655"><span class="hs-identifier hs-var">unlifted_must_be_bang</span></a></span><span> </span><span class="annot"><span class="annottext">HsBind GhcTc
</span><a href="#local-6989586621681141665"><span class="hs-identifier hs-var">bind</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-137"></span><span>        </span><span class="hs-comment">-- Complain about a binding that looks lazy</span><span>
</span><span id="line-138"></span><span>        </span><span class="hs-comment">--    e.g.    let I# y = x in ...</span><span>
</span><span id="line-139"></span><span>        </span><span class="hs-comment">-- Remember, in checkStrictBinds we are going to do strict</span><span>
</span><span id="line-140"></span><span>        </span><span class="hs-comment">-- matching, so (for software engineering reasons) we insist</span><span>
</span><span id="line-141"></span><span>        </span><span class="hs-comment">-- that the strictness is manifest on each binding</span><span>
</span><span id="line-142"></span><span>        </span><span class="hs-comment">-- However, lone (unboxed) variables are ok</span><span>
</span><span id="line-143"></span><span>
</span><span id="line-144"></span><span>
</span><span id="line-145"></span><span>            </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">HsBind GhcTc -&gt; CoreExpr -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsUnliftedBind"><span class="hs-identifier hs-var">dsUnliftedBind</span></a></span><span> </span><span class="annot"><span class="annottext">HsBind GhcTc
</span><a href="#local-6989586621681141665"><span class="hs-identifier hs-var">bind</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141667"><span class="hs-identifier hs-var">body</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-146"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-147"></span><span>    </span><span id="local-6989586621681141662"><span class="annot"><span class="annottext">is_polymorphic :: HsBindLR idL idR -&gt; Bool
</span><a href="#local-6989586621681141662"><span class="hs-identifier hs-var hs-var">is_polymorphic</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Binds.html#AbsBinds"><span class="hs-identifier hs-type">AbsBinds</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">abs_tvs :: forall idL idR. HsBindLR idL idR -&gt; [Id]
</span><a href="GHC.Hs.Binds.html#abs_tvs"><span class="hs-identifier hs-var">abs_tvs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681141649"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681141649"><span class="hs-identifier hs-var">tvs</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">abs_ev_vars :: forall idL idR. HsBindLR idL idR -&gt; [Id]
</span><a href="GHC.Hs.Binds.html#abs_ev_vars"><span class="hs-identifier hs-var">abs_ev_vars</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681141647"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681141647"><span class="hs-identifier hs-var">evs</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-148"></span><span>                     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Id] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681141649"><span class="hs-identifier hs-var">tvs</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">[Id] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681141647"><span class="hs-identifier hs-var">evs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-149"></span><span>    </span><span class="annot"><a href="#local-6989586621681141662"><span class="hs-identifier hs-var">is_polymorphic</span></a></span><span> </span><span class="annot"><span class="annottext">HsBindLR idL idR
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-150"></span><span>
</span><span id="line-151"></span><span>    </span><span id="local-6989586621681141655"><span class="annot"><span class="annottext">unlifted_must_be_bang :: a -&gt; SDoc
</span><a href="#local-6989586621681141655"><span class="hs-identifier hs-var hs-var">unlifted_must_be_bang</span></a></span></span><span> </span><span id="local-6989586621681141641"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681141641"><span class="hs-identifier hs-var">bind</span></a></span></span><span>
</span><span id="line-152"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; Int -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Pattern bindings containing unlifted types should use&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span>
</span><span id="line-153"></span><span>              </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;an outermost bang pattern:&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-154"></span><span>           </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; SDoc
forall {a}. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681141641"><span class="hs-identifier hs-var">bind</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-155"></span><span>
</span><span id="line-156"></span><span>    </span><span id="local-6989586621681141660"><span class="annot"><span class="annottext">poly_bind_err :: a -&gt; SDoc
</span><a href="#local-6989586621681141660"><span class="hs-identifier hs-var hs-var">poly_bind_err</span></a></span></span><span> </span><span id="local-6989586621681141634"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681141634"><span class="hs-identifier hs-var">bind</span></a></span></span><span>
</span><span id="line-157"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; Int -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;You can't mix polymorphic and unlifted bindings:&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-158"></span><span>           </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; SDoc
forall {a}. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681141634"><span class="hs-identifier hs-var">bind</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span>
</span><span id="line-159"></span><span>        </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Probable fix: add a type signature&quot;</span></span><span>
</span><span id="line-160"></span><span>
</span><span id="line-161"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#ds_val_bind"><span class="hs-identifier hs-var">ds_val_bind</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681141633"><span class="annot"><span class="annottext">RecFlag
</span><a href="#local-6989586621681141633"><span class="hs-identifier hs-var">is_rec</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681141632"><span class="annot"><span class="annottext">LHsBinds GhcTc
</span><a href="#local-6989586621681141632"><span class="hs-identifier hs-var">binds</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681141631"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141631"><span class="hs-identifier hs-var">_body</span></a></span></span><span>
</span><span id="line-162"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">(LHsBindLR GhcTc GhcTc -&gt; Bool) -&gt; LHsBinds GhcTc -&gt; Bool
forall a. (a -&gt; Bool) -&gt; Bag a -&gt; Bool
</span><a href="GHC.Data.Bag.html#anyBag"><span class="hs-identifier hs-var">anyBag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsBind GhcTc -&gt; Bool
</span><a href="GHC.Hs.Utils.html#isUnliftedHsBind"><span class="hs-identifier hs-var">isUnliftedHsBind</span></a></span><span> </span><span class="annot"><span class="annottext">(HsBind GhcTc -&gt; Bool)
-&gt; (LHsBindLR GhcTc GhcTc -&gt; HsBind GhcTc)
-&gt; LHsBindLR GhcTc GhcTc
-&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">LHsBindLR GhcTc GhcTc -&gt; HsBind GhcTc
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">LHsBinds GhcTc
</span><a href="#local-6989586621681141632"><span class="hs-identifier hs-var">binds</span></a></span><span>  </span><span class="hs-comment">-- see Note [Strict binds checks] in GHC.HsToCore.Binds</span><span>
</span><span id="line-163"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">isRec</span><span> </span><span class="hs-identifier">is_rec</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-164"></span><span>    </span><span class="annot"><span class="annottext">SDoc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Monad.html#errDsCoreExpr"><span class="hs-identifier hs-var">errDsCoreExpr</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; DsM CoreExpr) -&gt; SDoc -&gt; DsM CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-165"></span><span>    </span><span class="annot"><span class="annottext">SDoc -&gt; Int -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Recursive bindings for unlifted types aren't allowed:&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-166"></span><span>       </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(LHsBindLR GhcTc GhcTc -&gt; SDoc)
-&gt; [LHsBindLR GhcTc GhcTc] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">LHsBindLR GhcTc GhcTc -&gt; SDoc
forall {a}. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsBinds GhcTc -&gt; [LHsBindLR GhcTc GhcTc]
forall a. Bag a -&gt; [a]
</span><a href="GHC.Data.Bag.html#bagToList"><span class="hs-identifier hs-var">bagToList</span></a></span><span> </span><span class="annot"><span class="annottext">LHsBinds GhcTc
</span><a href="#local-6989586621681141632"><span class="hs-identifier hs-var">binds</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-167"></span><span>
</span><span id="line-168"></span><span class="hs-comment">-- Ordinary case for bindings; none should be unlifted</span><span>
</span><span id="line-169"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#ds_val_bind"><span class="hs-identifier hs-var">ds_val_bind</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681141623"><span class="annot"><span class="annottext">RecFlag
</span><a href="#local-6989586621681141623"><span class="hs-identifier hs-var">is_rec</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681141622"><span class="annot"><span class="annottext">LHsBinds GhcTc
</span><a href="#local-6989586621681141622"><span class="hs-identifier hs-var">binds</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681141621"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141621"><span class="hs-identifier hs-var">body</span></a></span></span><span>
</span><span id="line-170"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>  </span><span class="hs-special">{</span><span> </span><span class="hs-identifier">MASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">isRec</span><span> </span><span class="hs-identifier">is_rec</span><span> </span><span class="hs-operator">||</span><span> </span><span class="hs-identifier">isSingletonBag</span><span> </span><span class="hs-identifier">binds</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-171"></span><span>               </span><span class="hs-comment">-- we should never produce a non-recursive list of multiple binds</span><span>
</span><span id="line-172"></span><span>
</span><span id="line-173"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681141618"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681141618"><span class="hs-identifier hs-var">force_vars</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681141617"><span class="annot"><span class="annottext">[(Id, CoreExpr)]
</span><a href="#local-6989586621681141617"><span class="hs-identifier hs-var">prs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsBinds GhcTc -&gt; DsM ([Id], [(Id, CoreExpr)])
</span><a href="GHC.HsToCore.Binds.html#dsLHsBinds"><span class="hs-identifier hs-var">dsLHsBinds</span></a></span><span> </span><span class="annot"><span class="annottext">LHsBinds GhcTc
</span><a href="#local-6989586621681141622"><span class="hs-identifier hs-var">binds</span></a></span><span>
</span><span id="line-174"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681141615"><span class="annot"><span class="annottext">body' :: CoreExpr
</span><a href="#local-6989586621681141615"><span class="hs-identifier hs-var hs-var">body'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Id -&gt; CoreExpr -&gt; CoreExpr) -&gt; CoreExpr -&gt; [Id] -&gt; CoreExpr
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; CoreExpr -&gt; CoreExpr
</span><a href="GHC.HsToCore.Utils.html#seqVar"><span class="hs-identifier hs-var">seqVar</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141621"><span class="hs-identifier hs-var">body</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681141618"><span class="hs-identifier hs-var">force_vars</span></a></span><span>
</span><span id="line-175"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-identifier">ASSERT2</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">not</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">any</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">isUnliftedType</span><span> </span><span class="hs-operator">.</span><span> </span><span class="hs-identifier">idType</span><span> </span><span class="hs-operator">.</span><span> </span><span class="hs-identifier">fst</span><span class="hs-special">)</span><span> </span><span class="hs-identifier">prs</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">is_rec</span><span> </span><span class="hs-operator">$$</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">binds</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-176"></span><span>          </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[(Id, CoreExpr)]
</span><a href="#local-6989586621681141617"><span class="hs-identifier hs-var">prs</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-177"></span><span>            </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; DsM CoreExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141621"><span class="hs-identifier hs-var">body</span></a></span><span>
</span><span id="line-178"></span><span>            </span><span class="annot"><span class="annottext">[(Id, CoreExpr)]
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; DsM CoreExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreBind -&gt; CoreExpr -&gt; CoreExpr
forall b. Bind b -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#Let"><span class="hs-identifier hs-var">Let</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[(Id, CoreExpr)] -&gt; CoreBind
forall b. [(b, Expr b)] -&gt; Bind b
</span><a href="GHC.Core.html#Rec"><span class="hs-identifier hs-var">Rec</span></a></span><span> </span><span class="annot"><span class="annottext">[(Id, CoreExpr)]
</span><a href="#local-6989586621681141617"><span class="hs-identifier hs-var">prs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141615"><span class="hs-identifier hs-var">body'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-179"></span><span>        </span><span class="hs-comment">-- Use a Rec regardless of is_rec.</span><span>
</span><span id="line-180"></span><span>        </span><span class="hs-comment">-- Why? Because it allows the binds to be all</span><span>
</span><span id="line-181"></span><span>        </span><span class="hs-comment">-- mixed up, which is what happens in one rare case</span><span>
</span><span id="line-182"></span><span>        </span><span class="hs-comment">-- Namely, for an AbsBind with no tyvars and no dicts,</span><span>
</span><span id="line-183"></span><span>        </span><span class="hs-comment">--         but which does have dictionary bindings.</span><span>
</span><span id="line-184"></span><span>        </span><span class="hs-comment">-- See notes with GHC.Tc.Solver.inferLoop [NO TYVARS]</span><span>
</span><span id="line-185"></span><span>        </span><span class="hs-comment">-- It turned out that wrapping a Rec here was the easiest solution</span><span>
</span><span id="line-186"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-187"></span><span>        </span><span class="hs-comment">-- NB The previous case dealt with unlifted bindings, so we</span><span>
</span><span id="line-188"></span><span>        </span><span class="hs-comment">--    only have to deal with lifted ones now; so Rec is ok</span><span>
</span><span id="line-189"></span><span>
</span><span id="line-190"></span><span class="hs-comment">------------------</span><span>
</span><span id="line-191"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsUnliftedBind"><span class="hs-identifier hs-type">dsUnliftedBind</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Binds.html#HsBind"><span class="hs-identifier hs-type">HsBind</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#DsM"><span class="hs-identifier hs-type">DsM</span></a></span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span>
</span><span id="line-192"></span><span id="dsUnliftedBind"><span class="annot"><span class="annottext">dsUnliftedBind :: HsBind GhcTc -&gt; CoreExpr -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsUnliftedBind"><span class="hs-identifier hs-var hs-var">dsUnliftedBind</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Binds.html#AbsBinds"><span class="hs-identifier hs-type">AbsBinds</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">abs_tvs :: forall idL idR. HsBindLR idL idR -&gt; [Id]
</span><a href="GHC.Hs.Binds.html#abs_tvs"><span class="hs-identifier hs-var">abs_tvs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">abs_ev_vars :: forall idL idR. HsBindLR idL idR -&gt; [Id]
</span><a href="GHC.Hs.Binds.html#abs_ev_vars"><span class="hs-identifier hs-var">abs_ev_vars</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-193"></span><span>               </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">abs_exports :: forall idL idR. HsBindLR idL idR -&gt; [ABExport idL]
</span><a href="GHC.Hs.Binds.html#abs_exports"><span class="hs-identifier hs-var">abs_exports</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681141606"><span class="annot"><span class="annottext">[ABExport GhcTc]
</span><a href="#local-6989586621681141606"><span class="hs-identifier hs-var">exports</span></a></span></span><span>
</span><span id="line-194"></span><span>               </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">abs_ev_binds :: forall idL idR. HsBindLR idL idR -&gt; [TcEvBinds]
</span><a href="GHC.Hs.Binds.html#abs_ev_binds"><span class="hs-identifier hs-var">abs_ev_binds</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681141604"><span class="annot"><span class="annottext">[TcEvBinds]
</span><a href="#local-6989586621681141604"><span class="hs-identifier hs-var">ev_binds</span></a></span></span><span>
</span><span id="line-195"></span><span>               </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">abs_binds :: forall idL idR. HsBindLR idL idR -&gt; LHsBinds idL
</span><a href="GHC.Hs.Binds.html#abs_binds"><span class="hs-identifier hs-var">abs_binds</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681141602"><span class="annot"><span class="annottext">LHsBinds GhcTc
</span><a href="#local-6989586621681141602"><span class="hs-identifier hs-var">lbinds</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span id="local-6989586621681141601"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141601"><span class="hs-identifier hs-var">body</span></a></span></span><span>
</span><span id="line-196"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681141600"><span class="annot"><span class="annottext">body1 :: CoreExpr
</span><a href="#local-6989586621681141600"><span class="hs-identifier hs-var hs-var">body1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(ABExport GhcTc -&gt; CoreExpr -&gt; CoreExpr)
-&gt; CoreExpr -&gt; [ABExport GhcTc] -&gt; CoreExpr
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="annot"><span class="annottext">ABExport GhcTc -&gt; CoreExpr -&gt; CoreExpr
forall {p}. (IdP p ~ Id) =&gt; ABExport p -&gt; CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621681141599"><span class="hs-identifier hs-var">bind_export</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141601"><span class="hs-identifier hs-var">body</span></a></span><span> </span><span class="annot"><span class="annottext">[ABExport GhcTc]
</span><a href="#local-6989586621681141606"><span class="hs-identifier hs-var">exports</span></a></span><span>
</span><span id="line-197"></span><span>             </span><span id="local-6989586621681141599"><span class="annot"><span class="annottext">bind_export :: ABExport p -&gt; CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621681141599"><span class="hs-identifier hs-var hs-var">bind_export</span></a></span></span><span> </span><span id="local-6989586621681141594"><span class="annot"><span class="annottext">ABExport p
</span><a href="#local-6989586621681141594"><span class="hs-keyword hs-var">export</span></a></span></span><span> </span><span id="local-6989586621681141593"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141593"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; CoreExpr -&gt; CoreExpr -&gt; CoreExpr
</span><a href="GHC.Core.Utils.html#bindNonRec"><span class="hs-identifier hs-var">bindNonRec</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ABExport p -&gt; IdP p
forall p. ABExport p -&gt; IdP p
</span><a href="GHC.Hs.Binds.html#abe_poly"><span class="hs-identifier hs-var hs-var">abe_poly</span></a></span><span> </span><span class="annot"><span class="annottext">ABExport p
</span><a href="#local-6989586621681141594"><span class="hs-keyword hs-var">export</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; CoreExpr
forall b. Id -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ABExport p -&gt; IdP p
forall p. ABExport p -&gt; IdP p
</span><a href="GHC.Hs.Binds.html#abe_mono"><span class="hs-identifier hs-var hs-var">abe_mono</span></a></span><span> </span><span class="annot"><span class="annottext">ABExport p
</span><a href="#local-6989586621681141594"><span class="hs-keyword hs-var">export</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141593"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-198"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681141588"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141588"><span class="hs-identifier hs-var">body2</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; LHsBindLR GhcTc GhcTc -&gt; DsM CoreExpr)
-&gt; CoreExpr -&gt; LHsBinds GhcTc -&gt; DsM CoreExpr
forall (t :: * -&gt; *) (m :: * -&gt; *) b a.
(Foldable t, Monad m) =&gt;
(b -&gt; a -&gt; m b) -&gt; b -&gt; t a -&gt; m b
</span><a href="../../base/src/Data.Foldable.html#foldlM"><span class="hs-identifier hs-var">foldlM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681141586"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141586"><span class="hs-identifier hs-var">body</span></a></span></span><span> </span><span id="local-6989586621681141585"><span class="annot"><span class="annottext">LHsBindLR GhcTc GhcTc
</span><a href="#local-6989586621681141585"><span class="hs-identifier hs-var">lbind</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HsBind GhcTc -&gt; CoreExpr -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsUnliftedBind"><span class="hs-identifier hs-var">dsUnliftedBind</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsBindLR GhcTc GhcTc -&gt; HsBind GhcTc
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">LHsBindLR GhcTc GhcTc
</span><a href="#local-6989586621681141585"><span class="hs-identifier hs-var">lbind</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141586"><span class="hs-identifier hs-var">body</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-199"></span><span>                            </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141600"><span class="hs-identifier hs-var">body1</span></a></span><span> </span><span class="annot"><span class="annottext">LHsBinds GhcTc
</span><a href="#local-6989586621681141602"><span class="hs-identifier hs-var">lbinds</span></a></span><span>
</span><span id="line-200"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681141584"><span class="annot"><span class="annottext">[CoreBind]
</span><a href="#local-6989586621681141584"><span class="hs-identifier hs-var">ds_binds</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[TcEvBinds] -&gt; DsM [CoreBind]
</span><a href="GHC.HsToCore.Binds.html#dsTcEvBinds_s"><span class="hs-identifier hs-var">dsTcEvBinds_s</span></a></span><span> </span><span class="annot"><span class="annottext">[TcEvBinds]
</span><a href="#local-6989586621681141604"><span class="hs-identifier hs-var">ev_binds</span></a></span><span>
</span><span id="line-201"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; DsM CoreExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[CoreBind] -&gt; CoreExpr -&gt; CoreExpr
</span><a href="GHC.Core.Make.html#mkCoreLets"><span class="hs-identifier hs-var">mkCoreLets</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreBind]
</span><a href="#local-6989586621681141584"><span class="hs-identifier hs-var">ds_binds</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141588"><span class="hs-identifier hs-var">body2</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-202"></span><span>
</span><span id="line-203"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsUnliftedBind"><span class="hs-identifier hs-var">dsUnliftedBind</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Binds.html#FunBind"><span class="hs-identifier hs-type">FunBind</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">fun_id :: forall idL idR. HsBindLR idL idR -&gt; Located (IdP idL)
</span><a href="GHC.Hs.Binds.html#fun_id"><span class="hs-identifier hs-var">fun_id</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681141580"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681141580"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621681141579"><span class="annot"><span class="annottext">IdP GhcTc
</span><a href="#local-6989586621681141579"><span class="hs-identifier hs-var">fun</span></a></span></span><span>
</span><span id="line-204"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">fun_matches :: forall idL idR. HsBindLR idL idR -&gt; MatchGroup idR (LHsExpr idR)
</span><a href="GHC.Hs.Binds.html#fun_matches"><span class="hs-identifier hs-var">fun_matches</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681141577"><span class="annot"><span class="annottext">MatchGroup GhcTc (LHsExpr GhcTc)
</span><a href="#local-6989586621681141577"><span class="hs-identifier hs-var">matches</span></a></span></span><span>
</span><span id="line-205"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">fun_ext :: forall idL idR. HsBindLR idL idR -&gt; XFunBind idL idR
</span><a href="GHC.Hs.Binds.html#fun_ext"><span class="hs-identifier hs-var">fun_ext</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681141575"><span class="annot"><span class="annottext">XFunBind GhcTc GhcTc
</span><a href="#local-6989586621681141575"><span class="hs-identifier hs-var">co_fn</span></a></span></span><span>
</span><span id="line-206"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">fun_tick :: forall idL idR. HsBindLR idL idR -&gt; [Tickish Id]
</span><a href="GHC.Hs.Binds.html#fun_tick"><span class="hs-identifier hs-var">fun_tick</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681141573"><span class="annot"><span class="annottext">[Tickish Id]
</span><a href="#local-6989586621681141573"><span class="hs-identifier hs-var">tick</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span id="local-6989586621681141572"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141572"><span class="hs-identifier hs-var">body</span></a></span></span><span>
</span><span id="line-207"></span><span>               </span><span class="hs-comment">-- Can't be a bang pattern (that looks like a PatBind)</span><span>
</span><span id="line-208"></span><span>               </span><span class="hs-comment">-- so must be simply unboxed</span><span>
</span><span id="line-209"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681141571"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681141571"><span class="hs-identifier hs-var">args</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681141570"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141570"><span class="hs-identifier hs-var">rhs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HsMatchContext GhcRn
-&gt; Maybe (LHsExpr GhcTc)
-&gt; MatchGroup GhcTc (LHsExpr GhcTc)
-&gt; DsM ([Id], CoreExpr)
</span><a href="GHC.HsToCore.Match.html#matchWrapper"><span class="hs-identifier hs-var">matchWrapper</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LIdP GhcRn -&gt; HsMatchContext GhcRn
forall p. LIdP p -&gt; HsMatchContext p
</span><a href="GHC.Hs.Utils.html#mkPrefixFunRhs"><span class="hs-identifier hs-var">mkPrefixFunRhs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; Name -&gt; GenLocated SrcSpan Name
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681141580"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">(Name -&gt; GenLocated SrcSpan Name)
-&gt; Name -&gt; GenLocated SrcSpan Name
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Name
</span><a href="GHC.Types.Id.html#idName"><span class="hs-identifier hs-var">idName</span></a></span><span> </span><span class="annot"><span class="annottext">Id
IdP GhcTc
</span><a href="#local-6989586621681141579"><span class="hs-identifier hs-var">fun</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-210"></span><span>                                     </span><span class="annot"><span class="annottext">Maybe (LHsExpr GhcTc)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">MatchGroup GhcTc (LHsExpr GhcTc)
</span><a href="#local-6989586621681141577"><span class="hs-identifier hs-var">matches</span></a></span><span>
</span><span id="line-211"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-identifier">MASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">null</span><span> </span><span class="hs-identifier">args</span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- Functions aren't lifted</span><span>
</span><span id="line-212"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-identifier">MASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">isIdHsWrapper</span><span> </span><span class="hs-identifier">co_fn</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-213"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681141565"><span class="annot"><span class="annottext">rhs' :: CoreExpr
</span><a href="#local-6989586621681141565"><span class="hs-identifier hs-var hs-var">rhs'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Tickish Id] -&gt; CoreExpr -&gt; CoreExpr
</span><a href="GHC.HsToCore.Utils.html#mkOptTickBox"><span class="hs-identifier hs-var">mkOptTickBox</span></a></span><span> </span><span class="annot"><span class="annottext">[Tickish Id]
</span><a href="#local-6989586621681141573"><span class="hs-identifier hs-var">tick</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141570"><span class="hs-identifier hs-var">rhs</span></a></span><span>
</span><span id="line-214"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; DsM CoreExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; CoreExpr -&gt; CoreExpr -&gt; CoreExpr
</span><a href="GHC.Core.Utils.html#bindNonRec"><span class="hs-identifier hs-var">bindNonRec</span></a></span><span> </span><span class="annot"><span class="annottext">Id
IdP GhcTc
</span><a href="#local-6989586621681141579"><span class="hs-identifier hs-var">fun</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141565"><span class="hs-identifier hs-var">rhs'</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141572"><span class="hs-identifier hs-var">body</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-215"></span><span>
</span><span id="line-216"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsUnliftedBind"><span class="hs-identifier hs-var">dsUnliftedBind</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Binds.html#PatBind"><span class="hs-identifier hs-type">PatBind</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">pat_lhs :: forall idL idR. HsBindLR idL idR -&gt; LPat idL
</span><a href="GHC.Hs.Binds.html#pat_lhs"><span class="hs-identifier hs-var">pat_lhs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681141561"><span class="annot"><span class="annottext">LPat GhcTc
</span><a href="#local-6989586621681141561"><span class="hs-identifier hs-var">pat</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">pat_rhs :: forall idL idR. HsBindLR idL idR -&gt; GRHSs idR (LHsExpr idR)
</span><a href="GHC.Hs.Binds.html#pat_rhs"><span class="hs-identifier hs-var">pat_rhs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681141559"><span class="annot"><span class="annottext">GRHSs GhcTc (LHsExpr GhcTc)
</span><a href="#local-6989586621681141559"><span class="hs-identifier hs-var">grhss</span></a></span></span><span>
</span><span id="line-217"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">pat_ext :: forall idL idR. HsBindLR idL idR -&gt; XPatBind idL idR
</span><a href="GHC.Hs.Binds.html#pat_ext"><span class="hs-identifier hs-var">pat_ext</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Binds.html#NPatBindTc"><span class="hs-identifier hs-type">NPatBindTc</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141556"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681141556"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span id="local-6989586621681141555"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141555"><span class="hs-identifier hs-var">body</span></a></span></span><span>
</span><span id="line-218"></span><span>  </span><span class="hs-glyph">=</span><span>     </span><span class="hs-comment">-- let C x# y# = rhs in body</span><span>
</span><span id="line-219"></span><span>        </span><span class="hs-comment">-- ==&gt; case rhs of C x# y# -&gt; body</span><span>
</span><span id="line-220"></span><span>    </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681141554"><span class="annot"><span class="annottext">[Deltas]
</span><a href="#local-6989586621681141554"><span class="hs-identifier hs-var">rhs_deltas</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HsMatchContext GhcRn -&gt; GRHSs GhcTc (LHsExpr GhcTc) -&gt; DsM [Deltas]
</span><a href="GHC.HsToCore.PmCheck.html#checkGuardMatches"><span class="hs-identifier hs-var">checkGuardMatches</span></a></span><span> </span><span class="annot"><span class="annottext">HsMatchContext GhcRn
forall p. HsMatchContext p
</span><a href="GHC.Hs.Expr.html#PatBindGuards"><span class="hs-identifier hs-var">PatBindGuards</span></a></span><span> </span><span class="annot"><span class="annottext">GRHSs GhcTc (LHsExpr GhcTc)
</span><a href="#local-6989586621681141559"><span class="hs-identifier hs-var">grhss</span></a></span><span>
</span><span id="line-221"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681141552"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141552"><span class="hs-identifier hs-var">rhs</span></a></span></span><span>         </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">GRHSs GhcTc (LHsExpr GhcTc)
-&gt; Type -&gt; Maybe (NonEmpty Deltas) -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.GuardedRHSs.html#dsGuarded"><span class="hs-identifier hs-var">dsGuarded</span></a></span><span> </span><span class="annot"><span class="annottext">GRHSs GhcTc (LHsExpr GhcTc)
</span><a href="#local-6989586621681141559"><span class="hs-identifier hs-var">grhss</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681141556"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Deltas] -&gt; Maybe (NonEmpty Deltas)
forall a. [a] -&gt; Maybe (NonEmpty a)
</span><a href="../../base/src/Data.List.NonEmpty.html#nonEmpty"><span class="hs-identifier hs-var">nonEmpty</span></a></span><span> </span><span class="annot"><span class="annottext">[Deltas]
</span><a href="#local-6989586621681141554"><span class="hs-identifier hs-var">rhs_deltas</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-222"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681141550"><span class="annot"><span class="annottext">upat :: Pat GhcTc
</span><a href="#local-6989586621681141550"><span class="hs-identifier hs-var hs-var">upat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Located (Pat GhcTc) -&gt; Pat GhcTc
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Pat GhcTc)
LPat GhcTc
</span><a href="#local-6989586621681141561"><span class="hs-identifier hs-var">pat</span></a></span><span>
</span><span id="line-223"></span><span>             </span><span id="local-6989586621681141549"><span class="annot"><span class="annottext">eqn :: EquationInfo
</span><a href="#local-6989586621681141549"><span class="hs-identifier hs-var hs-var">eqn</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">EqnInfo :: [Pat GhcTc] -&gt; Origin -&gt; MatchResult CoreExpr -&gt; EquationInfo
</span><a href="GHC.HsToCore.Monad.html#EqnInfo"><span class="hs-identifier hs-type">EqnInfo</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">eqn_pats :: [Pat GhcTc]
</span><a href="GHC.HsToCore.Monad.html#eqn_pats"><span class="hs-identifier hs-var">eqn_pats</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Pat GhcTc
</span><a href="#local-6989586621681141550"><span class="hs-identifier hs-var">upat</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-224"></span><span>                             </span><span class="annot"><span class="annottext">eqn_orig :: Origin
</span><a href="GHC.HsToCore.Monad.html#eqn_orig"><span class="hs-identifier hs-var">eqn_orig</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Origin
</span><a href="GHC.Types.Basic.html#FromSource"><span class="hs-identifier hs-var">FromSource</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-225"></span><span>                             </span><span class="annot"><span class="annottext">eqn_rhs :: MatchResult CoreExpr
</span><a href="GHC.HsToCore.Monad.html#eqn_rhs"><span class="hs-identifier hs-var">eqn_rhs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; MatchResult CoreExpr
</span><a href="GHC.HsToCore.Utils.html#cantFailMatchResult"><span class="hs-identifier hs-var">cantFailMatchResult</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141555"><span class="hs-identifier hs-var">body</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-226"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681141542"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141542"><span class="hs-identifier hs-var">var</span></a></span></span><span>    </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Type -&gt; Pat GhcTc -&gt; DsM Id
</span><a href="GHC.HsToCore.Utils.html#selectMatchVar"><span class="hs-identifier hs-var">selectMatchVar</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Core.Type.html#Many"><span class="hs-identifier hs-var">Many</span></a></span><span> </span><span class="annot"><span class="annottext">Pat GhcTc
</span><a href="#local-6989586621681141550"><span class="hs-identifier hs-var">upat</span></a></span><span>
</span><span id="line-227"></span><span>                    </span><span class="hs-comment">-- `var` will end up in a let binder, so the multiplicity</span><span>
</span><span id="line-228"></span><span>                    </span><span class="hs-comment">-- doesn't matter.</span><span>
</span><span id="line-229"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681141539"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141539"><span class="hs-identifier hs-var">result</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HsMatchContext GhcRn
-&gt; [Id] -&gt; [EquationInfo] -&gt; Type -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Match.html#matchEquations"><span class="hs-identifier hs-var">matchEquations</span></a></span><span> </span><span class="annot"><span class="annottext">HsMatchContext GhcRn
forall p. HsMatchContext p
</span><a href="GHC.Hs.Expr.html#PatBindRhs"><span class="hs-identifier hs-var">PatBindRhs</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141542"><span class="hs-identifier hs-var">var</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">EquationInfo
</span><a href="#local-6989586621681141549"><span class="hs-identifier hs-var">eqn</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreExpr -&gt; Type
</span><a href="GHC.Core.Utils.html#exprType"><span class="hs-identifier hs-var">exprType</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141555"><span class="hs-identifier hs-var">body</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-230"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; DsM CoreExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; CoreExpr -&gt; CoreExpr -&gt; CoreExpr
</span><a href="GHC.Core.Utils.html#bindNonRec"><span class="hs-identifier hs-var">bindNonRec</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141542"><span class="hs-identifier hs-var">var</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141552"><span class="hs-identifier hs-var">rhs</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141539"><span class="hs-identifier hs-var">result</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-231"></span><span>
</span><span id="line-232"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsUnliftedBind"><span class="hs-identifier hs-var">dsUnliftedBind</span></a></span><span> </span><span id="local-6989586621681141535"><span class="annot"><span class="annottext">HsBind GhcTc
</span><a href="#local-6989586621681141535"><span class="hs-identifier hs-var">bind</span></a></span></span><span> </span><span id="local-6989586621681141534"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141534"><span class="hs-identifier hs-var">body</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; DsM CoreExpr
forall a. HasCallStack =&gt; String -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dsLet: unlifted&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsBind GhcTc -&gt; SDoc
forall {a}. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">HsBind GhcTc
</span><a href="#local-6989586621681141535"><span class="hs-identifier hs-var">bind</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; SDoc
forall {a}. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141534"><span class="hs-identifier hs-var">body</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-233"></span><span>
</span><span id="line-234"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
*              Variables, constructors, literals                       *
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-241"></span><span>
</span><span id="line-242"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier hs-type">dsLExpr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#LHsExpr"><span class="hs-identifier hs-type">LHsExpr</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#DsM"><span class="hs-identifier hs-type">DsM</span></a></span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span>
</span><span id="line-243"></span><span>
</span><span id="line-244"></span><span id="dsLExpr"><span class="annot"><span class="annottext">dsLExpr :: LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier hs-var hs-var">dsLExpr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681141532"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681141532"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span id="local-6989586621681141531"><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681141531"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-245"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SrcSpan -&gt; DsM CoreExpr -&gt; DsM CoreExpr
forall a. SrcSpan -&gt; DsM a -&gt; DsM a
</span><a href="GHC.HsToCore.Monad.html#putSrcSpanDs"><span class="hs-identifier hs-var">putSrcSpanDs</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681141532"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">(DsM CoreExpr -&gt; DsM CoreExpr) -&gt; DsM CoreExpr -&gt; DsM CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-246"></span><span>    </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681141530"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141530"><span class="hs-identifier hs-var">core_expr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681141531"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-247"></span><span>   </span><span class="hs-comment">-- uncomment this check to test the hsExprType function in GHC.Tc.Utils.Zonk</span><span>
</span><span id="line-248"></span><span>   </span><span class="hs-comment">--    ; MASSERT2( exprType core_expr `eqType` hsExprType e</span><span>
</span><span id="line-249"></span><span>   </span><span class="hs-comment">--              , ppr e &lt;+&gt; dcolon &lt;+&gt; ppr (hsExprType e) $$</span><span>
</span><span id="line-250"></span><span>   </span><span class="hs-comment">--                ppr core_expr &lt;+&gt; dcolon &lt;+&gt; ppr (exprType core_expr) )</span><span>
</span><span id="line-251"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; DsM CoreExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141530"><span class="hs-identifier hs-var">core_expr</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-252"></span><span>
</span><span id="line-253"></span><span class="hs-comment">-- | Variant of 'dsLExpr' that ensures that the result is not levity</span><span>
</span><span id="line-254"></span><span class="hs-comment">-- polymorphic. This should be used when the resulting expression will</span><span>
</span><span id="line-255"></span><span class="hs-comment">-- be an argument to some other function.</span><span>
</span><span id="line-256"></span><span class="hs-comment">-- See Note [Levity polymorphism checking] in &quot;GHC.HsToCore.Monad&quot;</span><span>
</span><span id="line-257"></span><span class="hs-comment">-- See Note [Levity polymorphism invariants] in &quot;GHC.Core&quot;</span><span>
</span><span id="line-258"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsLExprNoLP"><span class="hs-identifier hs-type">dsLExprNoLP</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#LHsExpr"><span class="hs-identifier hs-type">LHsExpr</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#DsM"><span class="hs-identifier hs-type">DsM</span></a></span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span>
</span><span id="line-259"></span><span id="dsLExprNoLP"><span class="annot"><span class="annottext">dsLExprNoLP :: LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExprNoLP"><span class="hs-identifier hs-var hs-var">dsLExprNoLP</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681141529"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681141529"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span id="local-6989586621681141528"><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681141528"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-260"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SrcSpan -&gt; DsM CoreExpr -&gt; DsM CoreExpr
forall a. SrcSpan -&gt; DsM a -&gt; DsM a
</span><a href="GHC.HsToCore.Monad.html#putSrcSpanDs"><span class="hs-identifier hs-var">putSrcSpanDs</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681141529"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">(DsM CoreExpr -&gt; DsM CoreExpr) -&gt; DsM CoreExpr -&gt; DsM CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-261"></span><span>    </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681141527"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141527"><span class="hs-identifier hs-var">e'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681141528"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-262"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; SDoc -&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
</span><a href="GHC.HsToCore.Monad.html#dsNoLevPolyExpr"><span class="hs-identifier hs-var">dsNoLevPolyExpr</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141527"><span class="hs-identifier hs-var">e'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;In the type of expression:&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc -&gt; SDoc
forall {a}. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681141528"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-263"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; DsM CoreExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141527"><span class="hs-identifier hs-var">e'</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-264"></span><span>
</span><span id="line-265"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-type">dsExpr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#HsExpr"><span class="hs-identifier hs-type">HsExpr</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#DsM"><span class="hs-identifier hs-type">DsM</span></a></span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span>
</span><span id="line-266"></span><span id="dsExpr"><span class="annot"><span class="annottext">dsExpr :: HsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var hs-var">dsExpr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsPar"><span class="hs-identifier hs-type">HsPar</span></a></span><span> </span><span class="annot"><span class="annottext">XPar GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141523"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141523"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier hs-var">dsLExpr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141523"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-267"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#ExprWithTySig"><span class="hs-identifier hs-type">ExprWithTySig</span></a></span><span> </span><span class="annot"><span class="annottext">XExprWithTySig GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141521"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141521"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="annot"><span class="annottext">LHsSigWcType (NoGhcTc GhcTc)
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier hs-var">dsLExpr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141521"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-268"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsVar"><span class="hs-identifier hs-type">HsVar</span></a></span><span> </span><span class="annot"><span class="annottext">XVar GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141519"><span class="annot"><span class="annottext">IdP GhcTc
</span><a href="#local-6989586621681141519"><span class="hs-identifier hs-var">var</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsHsVar"><span class="hs-identifier hs-var">dsHsVar</span></a></span><span> </span><span class="annot"><span class="annottext">Id
IdP GhcTc
</span><a href="#local-6989586621681141519"><span class="hs-identifier hs-var">var</span></a></span><span>
</span><span id="line-269"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsUnboundVar"><span class="hs-identifier hs-type">HsUnboundVar</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; DsM CoreExpr
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dsExpr: HsUnboundVar&quot;</span></span><span> </span><span class="hs-comment">-- Typechecker eliminates them</span><span>
</span><span id="line-270"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsConLikeOut"><span class="hs-identifier hs-type">HsConLikeOut</span></a></span><span> </span><span class="annot"><span class="annottext">XConLikeOut GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141515"><span class="annot"><span class="annottext">ConLike
</span><a href="#local-6989586621681141515"><span class="hs-identifier hs-var">con</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConLike -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsConLike"><span class="hs-identifier hs-var">dsConLike</span></a></span><span> </span><span class="annot"><span class="annottext">ConLike
</span><a href="#local-6989586621681141515"><span class="hs-identifier hs-var">con</span></a></span><span>
</span><span id="line-271"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsIPVar"><span class="hs-identifier hs-type">HsIPVar</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; DsM CoreExpr
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dsExpr: HsIPVar&quot;</span></span><span>
</span><span id="line-272"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsOverLabel"><span class="hs-identifier hs-type">HsOverLabel</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; DsM CoreExpr
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dsExpr: HsOverLabel&quot;</span></span><span>
</span><span id="line-273"></span><span>
</span><span id="line-274"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsLit"><span class="hs-identifier hs-type">HsLit</span></a></span><span> </span><span class="annot"><span class="annottext">XLitE GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141510"><span class="annot"><span class="annottext">HsLit GhcTc
</span><a href="#local-6989586621681141510"><span class="hs-identifier hs-var">lit</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-275"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">HsLit GhcTc -&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
</span><a href="GHC.HsToCore.Match.Literal.html#warnAboutOverflowedLit"><span class="hs-identifier hs-var">warnAboutOverflowedLit</span></a></span><span> </span><span class="annot"><span class="annottext">HsLit GhcTc
</span><a href="#local-6989586621681141510"><span class="hs-identifier hs-var">lit</span></a></span><span>
</span><span id="line-276"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">HsLit GhcRn -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Match.Literal.html#dsLit"><span class="hs-identifier hs-var">dsLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsLit GhcTc -&gt; HsLit GhcRn
forall (p1 :: Pass) (p2 :: Pass).
HsLit (GhcPass p1) -&gt; HsLit (GhcPass p2)
</span><a href="GHC.Hs.Lit.html#convertLit"><span class="hs-identifier hs-var">convertLit</span></a></span><span> </span><span class="annot"><span class="annottext">HsLit GhcTc
</span><a href="#local-6989586621681141510"><span class="hs-identifier hs-var">lit</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-277"></span><span>
</span><span id="line-278"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsOverLit"><span class="hs-identifier hs-type">HsOverLit</span></a></span><span> </span><span class="annot"><span class="annottext">XOverLitE GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141506"><span class="annot"><span class="annottext">HsOverLit GhcTc
</span><a href="#local-6989586621681141506"><span class="hs-identifier hs-var">lit</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-279"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">HsOverLit GhcTc -&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
</span><a href="GHC.HsToCore.Match.Literal.html#warnAboutOverflowedOverLit"><span class="hs-identifier hs-var">warnAboutOverflowedOverLit</span></a></span><span> </span><span class="annot"><span class="annottext">HsOverLit GhcTc
</span><a href="#local-6989586621681141506"><span class="hs-identifier hs-var">lit</span></a></span><span>
</span><span id="line-280"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">HsOverLit GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Match.Literal.html#dsOverLit"><span class="hs-identifier hs-var">dsOverLit</span></a></span><span> </span><span class="annot"><span class="annottext">HsOverLit GhcTc
</span><a href="#local-6989586621681141506"><span class="hs-identifier hs-var">lit</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-281"></span><span>
</span><span id="line-282"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span id="local-6989586621681141503"><span class="annot"><span class="annottext">e :: HsExpr GhcTc
</span><a href="#local-6989586621681141503"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#XExpr"><span class="hs-identifier hs-type">XExpr</span></a></span><span> </span><span id="local-6989586621681141501"><span class="annot"><span class="annottext">XXExpr GhcTc
</span><a href="#local-6989586621681141501"><span class="hs-identifier hs-var">expansion</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-283"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">XXExpr GhcTc
</span><a href="#local-6989586621681141501"><span class="hs-identifier hs-var">expansion</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-284"></span><span>      </span><span class="annot"><a href="GHC.Hs.Expr.html#ExpansionExpr"><span class="hs-identifier hs-type">ExpansionExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsExpanded"><span class="hs-identifier hs-type">HsExpanded</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcRn
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141498"><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681141498"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681141498"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-285"></span><span>      </span><span class="annot"><a href="GHC.Hs.Expr.html#WrapExpr"><span class="hs-identifier hs-type">WrapExpr</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsHsWrapped"><span class="hs-identifier hs-var">dsHsWrapped</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681141503"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-286"></span><span>
</span><span id="line-287"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#NegApp"><span class="hs-identifier hs-type">NegApp</span></a></span><span> </span><span class="annot"><span class="annottext">XNegApp GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681141494"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681141494"><span class="hs-identifier hs-var">loc</span></a></span></span><span>
</span><span id="line-288"></span><span>                    </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsOverLit"><span class="hs-identifier hs-type">HsOverLit</span></a></span><span> </span><span class="annot"><span class="annottext">XOverLitE GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141493"><span class="annot"><span class="annottext">lit :: HsOverLit GhcTc
</span><a href="#local-6989586621681141493"><span class="hs-identifier hs-var">lit</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Lit.html#OverLit"><span class="hs-identifier hs-type">OverLit</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ol_val :: forall p. HsOverLit p -&gt; OverLitVal
</span><a href="GHC.Hs.Lit.html#ol_val"><span class="hs-identifier hs-var">ol_val</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Lit.html#HsIntegral"><span class="hs-identifier hs-type">HsIntegral</span></a></span><span> </span><span id="local-6989586621681141489"><span class="annot"><span class="annottext">IntegralLit
</span><a href="#local-6989586621681141489"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">}</span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-289"></span><span>                </span><span id="local-6989586621681141488"><span class="annot"><span class="annottext">SyntaxExpr GhcTc
</span><a href="#local-6989586621681141488"><span class="hs-identifier hs-var">neg_expr</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-290"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681141487"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141487"><span class="hs-identifier hs-var">expr'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">SrcSpan -&gt; DsM CoreExpr -&gt; DsM CoreExpr
forall a. SrcSpan -&gt; DsM a -&gt; DsM a
</span><a href="GHC.HsToCore.Monad.html#putSrcSpanDs"><span class="hs-identifier hs-var">putSrcSpanDs</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681141494"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">(DsM CoreExpr -&gt; DsM CoreExpr) -&gt; DsM CoreExpr -&gt; DsM CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-291"></span><span>          </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">HsOverLit GhcTc -&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
</span><a href="GHC.HsToCore.Match.Literal.html#warnAboutOverflowedOverLit"><span class="hs-identifier hs-var">warnAboutOverflowedOverLit</span></a></span><span>
</span><span id="line-292"></span><span>              </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsOverLit GhcTc
</span><a href="#local-6989586621681141493"><span class="hs-identifier hs-var">lit</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ol_val :: OverLitVal
</span><a href="GHC.Hs.Lit.html#ol_val"><span class="hs-identifier hs-var">ol_val</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IntegralLit -&gt; OverLitVal
</span><a href="GHC.Hs.Lit.html#HsIntegral"><span class="hs-identifier hs-var">HsIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IntegralLit -&gt; IntegralLit
</span><a href="GHC.Types.Basic.html#negateIntegralLit"><span class="hs-identifier hs-var">negateIntegralLit</span></a></span><span> </span><span class="annot"><span class="annottext">IntegralLit
</span><a href="#local-6989586621681141489"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-293"></span><span>          </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">HsOverLit GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Match.Literal.html#dsOverLit"><span class="hs-identifier hs-var">dsOverLit</span></a></span><span> </span><span class="annot"><span class="annottext">HsOverLit GhcTc
</span><a href="#local-6989586621681141493"><span class="hs-identifier hs-var">lit</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-294"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">SyntaxExpr GhcTc -&gt; [CoreExpr] -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsSyntaxExpr"><span class="hs-identifier hs-var">dsSyntaxExpr</span></a></span><span> </span><span class="annot"><span class="annottext">SyntaxExpr GhcTc
</span><a href="#local-6989586621681141488"><span class="hs-identifier hs-var">neg_expr</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141487"><span class="hs-identifier hs-var">expr'</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-295"></span><span>
</span><span id="line-296"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#NegApp"><span class="hs-identifier hs-type">NegApp</span></a></span><span> </span><span class="annot"><span class="annottext">XNegApp GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141485"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141485"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span id="local-6989586621681141484"><span class="annot"><span class="annottext">SyntaxExpr GhcTc
</span><a href="#local-6989586621681141484"><span class="hs-identifier hs-var">neg_expr</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-297"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681141483"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141483"><span class="hs-identifier hs-var">expr'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier hs-var">dsLExpr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141485"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-298"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">SyntaxExpr GhcTc -&gt; [CoreExpr] -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsSyntaxExpr"><span class="hs-identifier hs-var">dsSyntaxExpr</span></a></span><span> </span><span class="annot"><span class="annottext">SyntaxExpr GhcTc
</span><a href="#local-6989586621681141484"><span class="hs-identifier hs-var">neg_expr</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141483"><span class="hs-identifier hs-var">expr'</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-299"></span><span>
</span><span id="line-300"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsLam"><span class="hs-identifier hs-type">HsLam</span></a></span><span> </span><span class="annot"><span class="annottext">XLam GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141481"><span class="annot"><span class="annottext">MatchGroup GhcTc (LHsExpr GhcTc)
</span><a href="#local-6989586621681141481"><span class="hs-identifier hs-var">a_Match</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-301"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([Id] -&gt; CoreExpr -&gt; CoreExpr) -&gt; ([Id], CoreExpr) -&gt; CoreExpr
forall a b c. (a -&gt; b -&gt; c) -&gt; (a, b) -&gt; c
</span><a href="../../base/src/Data.Tuple.html#uncurry"><span class="hs-identifier hs-var">uncurry</span></a></span><span> </span><span class="annot"><span class="annottext">[Id] -&gt; CoreExpr -&gt; CoreExpr
forall b. [b] -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#mkLams"><span class="hs-identifier hs-var">mkLams</span></a></span><span> </span><span class="annot"><span class="annottext">(([Id], CoreExpr) -&gt; CoreExpr)
-&gt; DsM ([Id], CoreExpr) -&gt; DsM CoreExpr
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">HsMatchContext GhcRn
-&gt; Maybe (LHsExpr GhcTc)
-&gt; MatchGroup GhcTc (LHsExpr GhcTc)
-&gt; DsM ([Id], CoreExpr)
</span><a href="GHC.HsToCore.Match.html#matchWrapper"><span class="hs-identifier hs-var">matchWrapper</span></a></span><span> </span><span class="annot"><span class="annottext">HsMatchContext GhcRn
forall p. HsMatchContext p
</span><a href="GHC.Hs.Expr.html#LambdaExpr"><span class="hs-identifier hs-var">LambdaExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (LHsExpr GhcTc)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">MatchGroup GhcTc (LHsExpr GhcTc)
</span><a href="#local-6989586621681141481"><span class="hs-identifier hs-var">a_Match</span></a></span><span>
</span><span id="line-302"></span><span>
</span><span id="line-303"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsLamCase"><span class="hs-identifier hs-type">HsLamCase</span></a></span><span> </span><span class="annot"><span class="annottext">XLamCase GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141475"><span class="annot"><span class="annottext">MatchGroup GhcTc (LHsExpr GhcTc)
</span><a href="#local-6989586621681141475"><span class="hs-identifier hs-var">matches</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-304"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span id="local-6989586621681141474"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141474"><span class="hs-identifier hs-var">discrim_var</span></a></span></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span id="local-6989586621681141473"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141473"><span class="hs-identifier hs-var">matching_code</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HsMatchContext GhcRn
-&gt; Maybe (LHsExpr GhcTc)
-&gt; MatchGroup GhcTc (LHsExpr GhcTc)
-&gt; DsM ([Id], CoreExpr)
</span><a href="GHC.HsToCore.Match.html#matchWrapper"><span class="hs-identifier hs-var">matchWrapper</span></a></span><span> </span><span class="annot"><span class="annottext">HsMatchContext GhcRn
forall p. HsMatchContext p
</span><a href="GHC.Hs.Expr.html#CaseAlt"><span class="hs-identifier hs-var">CaseAlt</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (LHsExpr GhcTc)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">MatchGroup GhcTc (LHsExpr GhcTc)
</span><a href="#local-6989586621681141475"><span class="hs-identifier hs-var">matches</span></a></span><span>
</span><span id="line-305"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; DsM CoreExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; DsM CoreExpr) -&gt; CoreExpr -&gt; DsM CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; CoreExpr -&gt; CoreExpr
forall b. b -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#Lam"><span class="hs-identifier hs-var">Lam</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141474"><span class="hs-identifier hs-var">discrim_var</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141473"><span class="hs-identifier hs-var">matching_code</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-306"></span><span>
</span><span id="line-307"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span id="local-6989586621681141470"><span class="annot"><span class="annottext">e :: HsExpr GhcTc
</span><a href="#local-6989586621681141470"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsApp"><span class="hs-identifier hs-type">HsApp</span></a></span><span> </span><span class="annot"><span class="annottext">XApp GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141468"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141468"><span class="hs-identifier hs-var">fun</span></a></span></span><span> </span><span id="local-6989586621681141467"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141467"><span class="hs-identifier hs-var">arg</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-308"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681141466"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141466"><span class="hs-identifier hs-var">fun'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier hs-var">dsLExpr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141468"><span class="hs-identifier hs-var">fun</span></a></span><span>
</span><span id="line-309"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">DsM CoreExpr -&gt; (CoreExpr -&gt; CoreExpr) -&gt; DsM CoreExpr
forall a. DsM a -&gt; (a -&gt; CoreExpr) -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Monad.html#dsWhenNoErrs"><span class="hs-identifier hs-var">dsWhenNoErrs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExprNoLP"><span class="hs-identifier hs-var">dsLExprNoLP</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141467"><span class="hs-identifier hs-var">arg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-310"></span><span>                      </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681141464"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141464"><span class="hs-identifier hs-var">arg'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; CoreExpr -&gt; CoreExpr -&gt; CoreExpr
</span><a href="GHC.HsToCore.Utils.html#mkCoreAppDs"><span class="hs-identifier hs-var">mkCoreAppDs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;HsApp&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc -&gt; SDoc
forall {a}. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681141470"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141466"><span class="hs-identifier hs-var">fun'</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141464"><span class="hs-identifier hs-var">arg'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-311"></span><span>
</span><span id="line-312"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span id="local-6989586621681141462"><span class="annot"><span class="annottext">e :: HsExpr GhcTc
</span><a href="#local-6989586621681141462"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsAppType"><span class="hs-identifier hs-type">HsAppType</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsHsWrapped"><span class="hs-identifier hs-var">dsHsWrapped</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681141462"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-313"></span><span>
</span><span id="line-314"></span><span class="hs-comment">{-
Note [Desugaring vars]
~~~~~~~~~~~~~~~~~~~~~~
In one situation we can get a *coercion* variable in a HsVar, namely
the support method for an equality superclass:
   class (a~b) =&gt; C a b where ...
   instance (blah) =&gt; C (T a) (T b) where ..
Then we get
   $dfCT :: forall ab. blah =&gt; C (T a) (T b)
   $dfCT ab blah = MkC ($c$p1C a blah) ($cop a blah)

   $c$p1C :: forall ab. blah =&gt; (T a ~ T b)
   $c$p1C ab blah = let ...; g :: T a ~ T b = ... } in g

That 'g' in the 'in' part is an evidence variable, and when
converting to core it must become a CO.


Note [Desugaring operator sections]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Desugaring left sections with -XPostfixOperators is straightforward: convert
(expr `op`) to (op expr).

Without -XPostfixOperators it's a bit more tricky. At first it looks as if we
can convert

    (expr `op`)

naively to

    \x -&gt; op expr x

But no!  expr might be a redex, and we can lose laziness badly this
way.  Consider

    map (expr `op`) xs

for example. If expr were a redex then eta-expanding naively would
result in multiple evaluations where the user might only have expected one.

So we convert instead to

    let y = expr in \x -&gt; op y x

Also, note that we must do this for both right and (perhaps surprisingly) left
sections. Why are left sections necessary? Consider the program (found in #18151),

    seq (True `undefined`) ()

according to the Haskell Report this should reduce to () (as it specifies
desugaring via eta expansion). However, if we fail to eta expand we will rather
bottom. Consequently, we must eta expand even in the case of a left section.

If `expr` is actually just a variable, say, then the simplifier
will inline `y`, eliminating the redundant `let`.

Note that this works even in the case that `expr` is unlifted. In this case
bindNonRec will automatically do the right thing, giving us:

    case expr of y -&gt; (\x -&gt; op y x)

See #18151.
-}</span><span>
</span><span id="line-377"></span><span>
</span><span id="line-378"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span id="local-6989586621681141460"><span class="annot"><span class="annottext">e :: HsExpr GhcTc
</span><a href="#local-6989586621681141460"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#OpApp"><span class="hs-identifier hs-type">OpApp</span></a></span><span> </span><span class="annot"><span class="annottext">XOpApp GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141458"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141458"><span class="hs-identifier hs-var">e1</span></a></span></span><span> </span><span id="local-6989586621681141457"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141457"><span class="hs-identifier hs-var">op</span></a></span></span><span> </span><span id="local-6989586621681141456"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141456"><span class="hs-identifier hs-var">e2</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-379"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-comment">-- for the type of y, we need the type of op's 2nd argument</span><span>
</span><span id="line-380"></span><span>    </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681141455"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141455"><span class="hs-identifier hs-var">op'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier hs-var">dsLExpr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141457"><span class="hs-identifier hs-var">op</span></a></span><span>
</span><span id="line-381"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">DsM [CoreExpr] -&gt; ([CoreExpr] -&gt; CoreExpr) -&gt; DsM CoreExpr
forall a. DsM a -&gt; (a -&gt; CoreExpr) -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Monad.html#dsWhenNoErrs"><span class="hs-identifier hs-var">dsWhenNoErrs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(LHsExpr GhcTc -&gt; DsM CoreExpr)
-&gt; [LHsExpr GhcTc] -&gt; DsM [CoreExpr]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExprNoLP"><span class="hs-identifier hs-var">dsLExprNoLP</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141458"><span class="hs-identifier hs-var">e1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141456"><span class="hs-identifier hs-var">e2</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-382"></span><span>                      </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681141453"><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621681141453"><span class="hs-identifier hs-var">exprs'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; CoreExpr -&gt; [CoreExpr] -&gt; CoreExpr
</span><a href="GHC.HsToCore.Utils.html#mkCoreAppsDs"><span class="hs-identifier hs-var">mkCoreAppsDs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;opapp&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc -&gt; SDoc
forall {a}. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681141460"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141455"><span class="hs-identifier hs-var">op'</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621681141453"><span class="hs-identifier hs-var">exprs'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-383"></span><span>
</span><span id="line-384"></span><span class="hs-comment">-- dsExpr (SectionL op expr)  ===  (expr `op`)  ~&gt;  \y -&gt; op expr y</span><span>
</span><span id="line-385"></span><span class="hs-comment">--</span><span>
</span><span id="line-386"></span><span class="hs-comment">-- See Note [Desugaring operator sections].</span><span>
</span><span id="line-387"></span><span class="hs-comment">-- N.B. this also must handle postfix operator sections due to -XPostfixOperators.</span><span>
</span><span id="line-388"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span id="local-6989586621681141451"><span class="annot"><span class="annottext">e :: HsExpr GhcTc
</span><a href="#local-6989586621681141451"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#SectionL"><span class="hs-identifier hs-type">SectionL</span></a></span><span> </span><span class="annot"><span class="annottext">XSectionL GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141449"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141449"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span id="local-6989586621681141448"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141448"><span class="hs-identifier hs-var">op</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-389"></span><span>  </span><span id="local-6989586621681141447"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681141447"><span class="hs-identifier hs-var">postfix_operators</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Extension -&gt; TcRnIf DsGblEnv DsLclEnv Bool
forall gbl lcl. Extension -&gt; TcRnIf gbl lcl Bool
</span><a href="GHC.Tc.Utils.Monad.html#xoptM"><span class="hs-identifier hs-var">xoptM</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#PostfixOperators"><span class="hs-identifier hs-var">LangExt.PostfixOperators</span></a></span><span>
</span><span id="line-390"></span><span>  </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681141447"><span class="hs-identifier hs-var">postfix_operators</span></a></span><span> </span><span class="hs-keyword">then</span><span>
</span><span id="line-391"></span><span>    </span><span class="hs-comment">-- Desugar (e !) to ((!) e)</span><span>
</span><span id="line-392"></span><span>    </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681141444"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141444"><span class="hs-identifier hs-var">op'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier hs-var">dsLExpr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141448"><span class="hs-identifier hs-var">op</span></a></span><span>
</span><span id="line-393"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">DsM CoreExpr -&gt; (CoreExpr -&gt; CoreExpr) -&gt; DsM CoreExpr
forall a. DsM a -&gt; (a -&gt; CoreExpr) -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Monad.html#dsWhenNoErrs"><span class="hs-identifier hs-var">dsWhenNoErrs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExprNoLP"><span class="hs-identifier hs-var">dsLExprNoLP</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141449"><span class="hs-identifier hs-var">expr</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">((CoreExpr -&gt; CoreExpr) -&gt; DsM CoreExpr)
-&gt; (CoreExpr -&gt; CoreExpr) -&gt; DsM CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621681141443"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141443"><span class="hs-identifier hs-var">expr'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-394"></span><span>         </span><span class="annot"><span class="annottext">SDoc -&gt; CoreExpr -&gt; CoreExpr -&gt; CoreExpr
</span><a href="GHC.HsToCore.Utils.html#mkCoreAppDs"><span class="hs-identifier hs-var">mkCoreAppDs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;sectionl&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; SDoc
forall {a}. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141449"><span class="hs-identifier hs-var">expr</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141444"><span class="hs-identifier hs-var">op'</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141443"><span class="hs-identifier hs-var">expr'</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-395"></span><span>  </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-396"></span><span>    </span><span id="local-6989586621681141442"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141442"><span class="hs-identifier hs-var">core_op</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier hs-var">dsLExpr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141448"><span class="hs-identifier hs-var">op</span></a></span><span>
</span><span id="line-397"></span><span>    </span><span id="local-6989586621681141441"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141441"><span class="hs-identifier hs-var">x_core</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier hs-var">dsLExpr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141449"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-398"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Type -&gt; ([Scaled Type], Type)
</span><a href="GHC.Core.Type.html#splitFunTys"><span class="hs-identifier hs-var">splitFunTys</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreExpr -&gt; Type
</span><a href="GHC.Core.Utils.html#exprType"><span class="hs-identifier hs-var">exprType</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141442"><span class="hs-identifier hs-var">core_op</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-399"></span><span>      </span><span class="hs-comment">-- Binary operator section</span><span>
</span><span id="line-400"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621681141439"><span class="annot"><span class="annottext">Scaled Type
</span><a href="#local-6989586621681141439"><span class="hs-identifier hs-var">x_ty</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621681141438"><span class="annot"><span class="annottext">Scaled Type
</span><a href="#local-6989586621681141438"><span class="hs-identifier hs-var">y_ty</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[Scaled Type]
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-401"></span><span>        </span><span class="annot"><span class="annottext">DsM [Id] -&gt; ([Id] -&gt; CoreExpr) -&gt; DsM CoreExpr
forall a. DsM a -&gt; (a -&gt; CoreExpr) -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Monad.html#dsWhenNoErrs"><span class="hs-identifier hs-var">dsWhenNoErrs</span></a></span><span>
</span><span id="line-402"></span><span>          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Scaled Type] -&gt; DsM [Id]
</span><a href="GHC.HsToCore.Monad.html#newSysLocalsDsNoLP"><span class="hs-identifier hs-var">newSysLocalsDsNoLP</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Scaled Type
</span><a href="#local-6989586621681141439"><span class="hs-identifier hs-var">x_ty</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Scaled Type
</span><a href="#local-6989586621681141438"><span class="hs-identifier hs-var">y_ty</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-403"></span><span>          </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">[</span><span id="local-6989586621681141436"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141436"><span class="hs-identifier hs-var">x_id</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681141435"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141435"><span class="hs-identifier hs-var">y_id</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-404"></span><span>            </span><span class="annot"><span class="annottext">Id -&gt; CoreExpr -&gt; CoreExpr -&gt; CoreExpr
</span><a href="GHC.Core.Utils.html#bindNonRec"><span class="hs-identifier hs-var">bindNonRec</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141436"><span class="hs-identifier hs-var">x_id</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141441"><span class="hs-identifier hs-var">x_core</span></a></span><span>
</span><span id="line-405"></span><span>            </span><span class="annot"><span class="annottext">(CoreExpr -&gt; CoreExpr) -&gt; CoreExpr -&gt; CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; CoreExpr -&gt; CoreExpr
forall b. b -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#Lam"><span class="hs-identifier hs-var">Lam</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141435"><span class="hs-identifier hs-var">y_id</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SDoc -&gt; CoreExpr -&gt; [CoreExpr] -&gt; CoreExpr
</span><a href="GHC.HsToCore.Utils.html#mkCoreAppsDs"><span class="hs-identifier hs-var">mkCoreAppsDs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;sectionl&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc -&gt; SDoc
forall {a}. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681141451"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-406"></span><span>                                     </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141442"><span class="hs-identifier hs-var">core_op</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Id -&gt; CoreExpr
forall b. Id -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141436"><span class="hs-identifier hs-var">x_id</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Id -&gt; CoreExpr
forall b. Id -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141435"><span class="hs-identifier hs-var">y_id</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-407"></span><span>
</span><span id="line-408"></span><span>      </span><span class="hs-comment">-- Postfix operator section</span><span>
</span><span id="line-409"></span><span>      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Scaled Type
</span><span class="hs-identifier">_</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[Scaled Type]
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-410"></span><span>        </span><span class="annot"><span class="annottext">CoreExpr -&gt; DsM CoreExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; DsM CoreExpr) -&gt; CoreExpr -&gt; DsM CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; CoreExpr -&gt; CoreExpr -&gt; CoreExpr
</span><a href="GHC.HsToCore.Utils.html#mkCoreAppDs"><span class="hs-identifier hs-var">mkCoreAppDs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;sectionl&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc -&gt; SDoc
forall {a}. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681141451"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141442"><span class="hs-identifier hs-var">core_op</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141441"><span class="hs-identifier hs-var">x_core</span></a></span><span>
</span><span id="line-411"></span><span>
</span><span id="line-412"></span><span>      </span><span class="annot"><span class="annottext">([Scaled Type], Type)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; DsM CoreExpr
forall a. HasCallStack =&gt; String -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dsExpr(SectionL)&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsExpr GhcTc -&gt; SDoc
forall {a}. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681141451"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-413"></span><span>
</span><span id="line-414"></span><span class="hs-comment">-- dsExpr (SectionR op expr)  === (`op` expr)  ~&gt;  \x -&gt; op x expr</span><span>
</span><span id="line-415"></span><span class="hs-comment">--</span><span>
</span><span id="line-416"></span><span class="hs-comment">-- See Note [Desugaring operator sections].</span><span>
</span><span id="line-417"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span id="local-6989586621681141434"><span class="annot"><span class="annottext">e :: HsExpr GhcTc
</span><a href="#local-6989586621681141434"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#SectionR"><span class="hs-identifier hs-type">SectionR</span></a></span><span> </span><span class="annot"><span class="annottext">XSectionR GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141432"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141432"><span class="hs-identifier hs-var">op</span></a></span></span><span> </span><span id="local-6989586621681141431"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141431"><span class="hs-identifier hs-var">expr</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-418"></span><span>    </span><span id="local-6989586621681141430"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141430"><span class="hs-identifier hs-var">core_op</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier hs-var">dsLExpr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141432"><span class="hs-identifier hs-var">op</span></a></span><span>
</span><span id="line-419"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681141429"><span class="annot"><span class="annottext">Scaled Type
</span><a href="#local-6989586621681141429"><span class="hs-identifier hs-var">x_ty</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621681141428"><span class="annot"><span class="annottext">Scaled Type
</span><a href="#local-6989586621681141428"><span class="hs-identifier hs-var">y_ty</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[Scaled Type]
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type -&gt; ([Scaled Type], Type)
</span><a href="GHC.Core.Type.html#splitFunTys"><span class="hs-identifier hs-var">splitFunTys</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreExpr -&gt; Type
</span><a href="GHC.Core.Utils.html#exprType"><span class="hs-identifier hs-var">exprType</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141430"><span class="hs-identifier hs-var">core_op</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-420"></span><span>    </span><span id="local-6989586621681141427"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141427"><span class="hs-identifier hs-var">y_core</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier hs-var">dsLExpr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141431"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-421"></span><span>    </span><span class="annot"><span class="annottext">DsM [Id] -&gt; ([Id] -&gt; CoreExpr) -&gt; DsM CoreExpr
forall a. DsM a -&gt; (a -&gt; CoreExpr) -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Monad.html#dsWhenNoErrs"><span class="hs-identifier hs-var">dsWhenNoErrs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Scaled Type] -&gt; DsM [Id]
</span><a href="GHC.HsToCore.Monad.html#newSysLocalsDsNoLP"><span class="hs-identifier hs-var">newSysLocalsDsNoLP</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Scaled Type
</span><a href="#local-6989586621681141429"><span class="hs-identifier hs-var">x_ty</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Scaled Type
</span><a href="#local-6989586621681141428"><span class="hs-identifier hs-var">y_ty</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-422"></span><span>                 </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">[</span><span id="local-6989586621681141426"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141426"><span class="hs-identifier hs-var">x_id</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681141425"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141425"><span class="hs-identifier hs-var">y_id</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Id -&gt; CoreExpr -&gt; CoreExpr -&gt; CoreExpr
</span><a href="GHC.Core.Utils.html#bindNonRec"><span class="hs-identifier hs-var">bindNonRec</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141425"><span class="hs-identifier hs-var">y_id</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141427"><span class="hs-identifier hs-var">y_core</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; CoreExpr) -&gt; CoreExpr -&gt; CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-423"></span><span>                                   </span><span class="annot"><span class="annottext">Id -&gt; CoreExpr -&gt; CoreExpr
forall b. b -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#Lam"><span class="hs-identifier hs-var">Lam</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141426"><span class="hs-identifier hs-var">x_id</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SDoc -&gt; CoreExpr -&gt; [CoreExpr] -&gt; CoreExpr
</span><a href="GHC.HsToCore.Utils.html#mkCoreAppsDs"><span class="hs-identifier hs-var">mkCoreAppsDs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;sectionr&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc -&gt; SDoc
forall {a}. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681141434"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-424"></span><span>                                                          </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141430"><span class="hs-identifier hs-var">core_op</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Id -&gt; CoreExpr
forall b. Id -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141426"><span class="hs-identifier hs-var">x_id</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Id -&gt; CoreExpr
forall b. Id -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141425"><span class="hs-identifier hs-var">y_id</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-425"></span><span>
</span><span id="line-426"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#ExplicitTuple"><span class="hs-identifier hs-type">ExplicitTuple</span></a></span><span> </span><span class="annot"><span class="annottext">XExplicitTuple GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141423"><span class="annot"><span class="annottext">[LHsTupArg GhcTc]
</span><a href="#local-6989586621681141423"><span class="hs-identifier hs-var">tup_args</span></a></span></span><span> </span><span id="local-6989586621681141422"><span class="annot"><span class="annottext">Boxity
</span><a href="#local-6989586621681141422"><span class="hs-identifier hs-var">boxity</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-427"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681141417"><span class="annot"><span class="annottext">go :: ([Id], [CoreExpr])
-&gt; GenLocated l (HsTupArg GhcTc)
-&gt; IOEnv (Env DsGblEnv DsLclEnv) ([Id], [CoreExpr])
</span><a href="#local-6989586621681141417"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681141416"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681141416"><span class="hs-identifier hs-var">lam_vars</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681141415"><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621681141415"><span class="hs-identifier hs-var">args</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">l
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#Missing"><span class="hs-identifier hs-type">Missing</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Scaled"><span class="hs-identifier hs-type">Scaled</span></a></span><span> </span><span id="local-6989586621681141412"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681141412"><span class="hs-identifier hs-var">mult</span></a></span></span><span> </span><span id="local-6989586621681141411"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681141411"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-428"></span><span>                    </span><span class="hs-comment">-- For every missing expression, we need</span><span>
</span><span id="line-429"></span><span>                    </span><span class="hs-comment">-- another lambda in the desugaring.</span><span>
</span><span id="line-430"></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681141410"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141410"><span class="hs-identifier hs-var">lam_var</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Type -&gt; Type -&gt; DsM Id
</span><a href="GHC.HsToCore.Monad.html#newSysLocalDsNoLP"><span class="hs-identifier hs-var">newSysLocalDsNoLP</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681141412"><span class="hs-identifier hs-var">mult</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681141411"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-431"></span><span>                    </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">([Id], [CoreExpr])
-&gt; IOEnv (Env DsGblEnv DsLclEnv) ([Id], [CoreExpr])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141410"><span class="hs-identifier hs-var">lam_var</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; [Id] -&gt; [Id]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681141416"><span class="hs-identifier hs-var">lam_vars</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Id -&gt; CoreExpr
forall b. Id -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141410"><span class="hs-identifier hs-var">lam_var</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; [CoreExpr] -&gt; [CoreExpr]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621681141415"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-432"></span><span>             </span><span class="annot"><a href="#local-6989586621681141417"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681141408"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681141408"><span class="hs-identifier hs-var">lam_vars</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681141407"><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621681141407"><span class="hs-identifier hs-var">args</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">l
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#Present"><span class="hs-identifier hs-type">Present</span></a></span><span> </span><span class="annot"><span class="annottext">XPresent GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141405"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141405"><span class="hs-identifier hs-var">expr</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-433"></span><span>                    </span><span class="hs-comment">-- Expressions that are present don't generate</span><span>
</span><span id="line-434"></span><span>                    </span><span class="hs-comment">-- lambdas, just arguments.</span><span>
</span><span id="line-435"></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681141404"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141404"><span class="hs-identifier hs-var">core_expr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExprNoLP"><span class="hs-identifier hs-var">dsLExprNoLP</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141405"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-436"></span><span>                    </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">([Id], [CoreExpr])
-&gt; IOEnv (Env DsGblEnv DsLclEnv) ([Id], [CoreExpr])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681141408"><span class="hs-identifier hs-var">lam_vars</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141404"><span class="hs-identifier hs-var">core_expr</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; [CoreExpr] -&gt; [CoreExpr]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621681141407"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-437"></span><span>
</span><span id="line-438"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env DsGblEnv DsLclEnv) ([Id], [CoreExpr])
-&gt; (([Id], [CoreExpr]) -&gt; CoreExpr) -&gt; DsM CoreExpr
forall a. DsM a -&gt; (a -&gt; CoreExpr) -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Monad.html#dsWhenNoErrs"><span class="hs-identifier hs-var">dsWhenNoErrs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(([Id], [CoreExpr])
 -&gt; LHsTupArg GhcTc
 -&gt; IOEnv (Env DsGblEnv DsLclEnv) ([Id], [CoreExpr]))
-&gt; ([Id], [CoreExpr])
-&gt; [LHsTupArg GhcTc]
-&gt; IOEnv (Env DsGblEnv DsLclEnv) ([Id], [CoreExpr])
forall (t :: * -&gt; *) (m :: * -&gt; *) b a.
(Foldable t, Monad m) =&gt;
(b -&gt; a -&gt; m b) -&gt; b -&gt; t a -&gt; m b
</span><a href="../../base/src/Control.Monad.html#foldM"><span class="hs-identifier hs-var">foldM</span></a></span><span> </span><span class="annot"><span class="annottext">([Id], [CoreExpr])
-&gt; LHsTupArg GhcTc
-&gt; IOEnv (Env DsGblEnv DsLclEnv) ([Id], [CoreExpr])
forall {l}.
([Id], [CoreExpr])
-&gt; GenLocated l (HsTupArg GhcTc)
-&gt; IOEnv (Env DsGblEnv DsLclEnv) ([Id], [CoreExpr])
</span><a href="#local-6989586621681141417"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[LHsTupArg GhcTc] -&gt; [LHsTupArg GhcTc]
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsTupArg GhcTc]
</span><a href="#local-6989586621681141423"><span class="hs-identifier hs-var">tup_args</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-439"></span><span>                </span><span class="hs-comment">-- The reverse is because foldM goes left-to-right</span><span>
</span><span id="line-440"></span><span>                      </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621681141401"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681141401"><span class="hs-identifier hs-var">lam_vars</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681141400"><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621681141400"><span class="hs-identifier hs-var">args</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-441"></span><span>                        </span><span class="annot"><span class="annottext">[Id] -&gt; CoreExpr -&gt; CoreExpr
</span><a href="GHC.Core.Make.html#mkCoreLams"><span class="hs-identifier hs-var">mkCoreLams</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681141401"><span class="hs-identifier hs-var">lam_vars</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; CoreExpr) -&gt; CoreExpr -&gt; CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-442"></span><span>                          </span><span class="annot"><span class="annottext">Boxity -&gt; [CoreExpr] -&gt; CoreExpr
</span><a href="GHC.Core.Make.html#mkCoreTupBoxity"><span class="hs-identifier hs-var">mkCoreTupBoxity</span></a></span><span> </span><span class="annot"><span class="annottext">Boxity
</span><a href="#local-6989586621681141422"><span class="hs-identifier hs-var">boxity</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621681141400"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-443"></span><span>                        </span><span class="hs-comment">-- See Note [Don't flatten tuples from HsSyn] in GHC.Core.Make</span><span>
</span><span id="line-444"></span><span>
</span><span id="line-445"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#ExplicitSum"><span class="hs-identifier hs-type">ExplicitSum</span></a></span><span> </span><span id="local-6989586621681141396"><span class="annot"><span class="annottext">XExplicitSum GhcTc
</span><a href="#local-6989586621681141396"><span class="hs-identifier hs-var">types</span></a></span></span><span> </span><span id="local-6989586621681141395"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681141395"><span class="hs-identifier hs-var">alt</span></a></span></span><span> </span><span id="local-6989586621681141394"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681141394"><span class="hs-identifier hs-var">arity</span></a></span></span><span> </span><span id="local-6989586621681141393"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141393"><span class="hs-identifier hs-var">expr</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-446"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DsM CoreExpr -&gt; (CoreExpr -&gt; CoreExpr) -&gt; DsM CoreExpr
forall a. DsM a -&gt; (a -&gt; CoreExpr) -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Monad.html#dsWhenNoErrs"><span class="hs-identifier hs-var">dsWhenNoErrs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExprNoLP"><span class="hs-identifier hs-var">dsLExprNoLP</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141393"><span class="hs-identifier hs-var">expr</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; [Type] -&gt; CoreExpr -&gt; CoreExpr
</span><a href="GHC.Core.Make.html#mkCoreUbxSum"><span class="hs-identifier hs-var">mkCoreUbxSum</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681141394"><span class="hs-identifier hs-var">arity</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681141395"><span class="hs-identifier hs-var">alt</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
XExplicitSum GhcTc
</span><a href="#local-6989586621681141396"><span class="hs-identifier hs-var">types</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-447"></span><span>
</span><span id="line-448"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsPragE"><span class="hs-identifier hs-type">HsPragE</span></a></span><span> </span><span class="annot"><span class="annottext">XPragE GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141390"><span class="annot"><span class="annottext">HsPragE GhcTc
</span><a href="#local-6989586621681141390"><span class="hs-identifier hs-var">prag</span></a></span></span><span> </span><span id="local-6989586621681141389"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141389"><span class="hs-identifier hs-var">expr</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-449"></span><span>  </span><span class="annot"><span class="annottext">HsPragE GhcTc -&gt; LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#ds_prag_expr"><span class="hs-identifier hs-var">ds_prag_expr</span></a></span><span> </span><span class="annot"><span class="annottext">HsPragE GhcTc
</span><a href="#local-6989586621681141390"><span class="hs-identifier hs-var">prag</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141389"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-450"></span><span>
</span><span id="line-451"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsCase"><span class="hs-identifier hs-type">HsCase</span></a></span><span> </span><span class="annot"><span class="annottext">XCase GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141386"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141386"><span class="hs-identifier hs-var">discrim</span></a></span></span><span> </span><span id="local-6989586621681141385"><span class="annot"><span class="annottext">MatchGroup GhcTc (LHsExpr GhcTc)
</span><a href="#local-6989586621681141385"><span class="hs-identifier hs-var">matches</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-452"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681141384"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141384"><span class="hs-identifier hs-var">core_discrim</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier hs-var">dsLExpr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141386"><span class="hs-identifier hs-var">discrim</span></a></span><span>
</span><span id="line-453"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span id="local-6989586621681141383"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141383"><span class="hs-identifier hs-var">discrim_var</span></a></span></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span id="local-6989586621681141382"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141382"><span class="hs-identifier hs-var">matching_code</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HsMatchContext GhcRn
-&gt; Maybe (LHsExpr GhcTc)
-&gt; MatchGroup GhcTc (LHsExpr GhcTc)
-&gt; DsM ([Id], CoreExpr)
</span><a href="GHC.HsToCore.Match.html#matchWrapper"><span class="hs-identifier hs-var">matchWrapper</span></a></span><span> </span><span class="annot"><span class="annottext">HsMatchContext GhcRn
forall p. HsMatchContext p
</span><a href="GHC.Hs.Expr.html#CaseAlt"><span class="hs-identifier hs-var">CaseAlt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; Maybe (LHsExpr GhcTc)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141386"><span class="hs-identifier hs-var">discrim</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">MatchGroup GhcTc (LHsExpr GhcTc)
</span><a href="#local-6989586621681141385"><span class="hs-identifier hs-var">matches</span></a></span><span>
</span><span id="line-454"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; DsM CoreExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; CoreExpr -&gt; CoreExpr -&gt; CoreExpr
</span><a href="GHC.Core.Utils.html#bindNonRec"><span class="hs-identifier hs-var">bindNonRec</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141383"><span class="hs-identifier hs-var">discrim_var</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141384"><span class="hs-identifier hs-var">core_discrim</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141382"><span class="hs-identifier hs-var">matching_code</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-455"></span><span>
</span><span id="line-456"></span><span class="hs-comment">-- Pepe: The binds are in scope in the body but NOT in the binding group</span><span>
</span><span id="line-457"></span><span class="hs-comment">--       This is to avoid silliness in breakpoints</span><span>
</span><span id="line-458"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsLet"><span class="hs-identifier hs-type">HsLet</span></a></span><span> </span><span class="annot"><span class="annottext">XLet GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141380"><span class="annot"><span class="annottext">LHsLocalBinds GhcTc
</span><a href="#local-6989586621681141380"><span class="hs-identifier hs-var">binds</span></a></span></span><span> </span><span id="local-6989586621681141379"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141379"><span class="hs-identifier hs-var">body</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-459"></span><span>    </span><span id="local-6989586621681141378"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141378"><span class="hs-identifier hs-var">body'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier hs-var">dsLExpr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141379"><span class="hs-identifier hs-var">body</span></a></span><span>
</span><span id="line-460"></span><span>    </span><span class="annot"><span class="annottext">LHsLocalBinds GhcTc -&gt; CoreExpr -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLocalBinds"><span class="hs-identifier hs-var">dsLocalBinds</span></a></span><span> </span><span class="annot"><span class="annottext">LHsLocalBinds GhcTc
</span><a href="#local-6989586621681141380"><span class="hs-identifier hs-var">binds</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141378"><span class="hs-identifier hs-var">body'</span></a></span><span>
</span><span id="line-461"></span><span>
</span><span id="line-462"></span><span class="hs-comment">-- We need the `ListComp' form to use `deListComp' (rather than the &quot;do&quot; form)</span><span>
</span><span id="line-463"></span><span class="hs-comment">-- because the interpretation of `stmts' depends on what sort of thing it is.</span><span>
</span><span id="line-464"></span><span class="hs-comment">--</span><span>
</span><span id="line-465"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsDo"><span class="hs-identifier hs-type">HsDo</span></a></span><span> </span><span id="local-6989586621681141376"><span class="annot"><span class="annottext">XDo GhcTc
</span><a href="#local-6989586621681141376"><span class="hs-identifier hs-var">res_ty</span></a></span></span><span> </span><span class="annot"><span class="annottext">HsStmtContext GhcRn
</span><a href="GHC.Hs.Expr.html#ListComp"><span class="hs-identifier hs-var">ListComp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141374"><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><a href="#local-6989586621681141374"><span class="hs-identifier hs-var">stmts</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ExprLStmt GhcTc] -&gt; Type -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.ListComp.html#dsListComp"><span class="hs-identifier hs-var">dsListComp</span></a></span><span> </span><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><a href="#local-6989586621681141374"><span class="hs-identifier hs-var">stmts</span></a></span><span> </span><span class="annot"><span class="annottext">Type
XDo GhcTc
</span><a href="#local-6989586621681141376"><span class="hs-identifier hs-var">res_ty</span></a></span><span>
</span><span id="line-466"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsDo"><span class="hs-identifier hs-type">HsDo</span></a></span><span> </span><span class="annot"><span class="annottext">XDo GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141372"><span class="annot"><span class="annottext">ctx :: HsStmtContext GhcRn
</span><a href="#local-6989586621681141372"><span class="hs-identifier hs-var">ctx</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.Hs.Expr.html#DoExpr"><span class="hs-identifier hs-type">DoExpr</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>      </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141370"><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><a href="#local-6989586621681141370"><span class="hs-identifier hs-var">stmts</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsStmtContext GhcRn -&gt; [ExprLStmt GhcTc] -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsDo"><span class="hs-identifier hs-var">dsDo</span></a></span><span> </span><span class="annot"><span class="annottext">HsStmtContext GhcRn
</span><a href="#local-6989586621681141372"><span class="hs-identifier hs-var">ctx</span></a></span><span> </span><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><a href="#local-6989586621681141370"><span class="hs-identifier hs-var">stmts</span></a></span><span>
</span><span id="line-467"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsDo"><span class="hs-identifier hs-type">HsDo</span></a></span><span> </span><span class="annot"><span class="annottext">XDo GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141368"><span class="annot"><span class="annottext">ctx :: HsStmtContext GhcRn
</span><a href="#local-6989586621681141368"><span class="hs-identifier hs-var">ctx</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><span class="annottext">HsStmtContext GhcRn
</span><a href="GHC.Hs.Expr.html#GhciStmtCtxt"><span class="hs-identifier hs-var">GhciStmtCtxt</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141366"><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><a href="#local-6989586621681141366"><span class="hs-identifier hs-var">stmts</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsStmtContext GhcRn -&gt; [ExprLStmt GhcTc] -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsDo"><span class="hs-identifier hs-var">dsDo</span></a></span><span> </span><span class="annot"><span class="annottext">HsStmtContext GhcRn
</span><a href="#local-6989586621681141368"><span class="hs-identifier hs-var">ctx</span></a></span><span> </span><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><a href="#local-6989586621681141366"><span class="hs-identifier hs-var">stmts</span></a></span><span>
</span><span id="line-468"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsDo"><span class="hs-identifier hs-type">HsDo</span></a></span><span> </span><span class="annot"><span class="annottext">XDo GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141365"><span class="annot"><span class="annottext">ctx :: HsStmtContext GhcRn
</span><a href="#local-6989586621681141365"><span class="hs-identifier hs-var">ctx</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.Hs.Expr.html#MDoExpr"><span class="hs-identifier hs-type">MDoExpr</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>     </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141363"><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><a href="#local-6989586621681141363"><span class="hs-identifier hs-var">stmts</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsStmtContext GhcRn -&gt; [ExprLStmt GhcTc] -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsDo"><span class="hs-identifier hs-var">dsDo</span></a></span><span> </span><span class="annot"><span class="annottext">HsStmtContext GhcRn
</span><a href="#local-6989586621681141365"><span class="hs-identifier hs-var">ctx</span></a></span><span> </span><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><a href="#local-6989586621681141363"><span class="hs-identifier hs-var">stmts</span></a></span><span>
</span><span id="line-469"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsDo"><span class="hs-identifier hs-type">HsDo</span></a></span><span> </span><span class="annot"><span class="annottext">XDo GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">HsStmtContext GhcRn
</span><a href="GHC.Hs.Expr.html#MonadComp"><span class="hs-identifier hs-var">MonadComp</span></a></span><span>     </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141361"><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><a href="#local-6989586621681141361"><span class="hs-identifier hs-var">stmts</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ExprLStmt GhcTc] -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.ListComp.html#dsMonadComp"><span class="hs-identifier hs-var">dsMonadComp</span></a></span><span> </span><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><a href="#local-6989586621681141361"><span class="hs-identifier hs-var">stmts</span></a></span><span>
</span><span id="line-470"></span><span>
</span><span id="line-471"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsIf"><span class="hs-identifier hs-type">HsIf</span></a></span><span> </span><span class="annot"><span class="annottext">XIf GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141358"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141358"><span class="hs-identifier hs-var">guard_expr</span></a></span></span><span> </span><span id="local-6989586621681141357"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141357"><span class="hs-identifier hs-var">then_expr</span></a></span></span><span> </span><span id="local-6989586621681141356"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141356"><span class="hs-identifier hs-var">else_expr</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-472"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681141355"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141355"><span class="hs-identifier hs-var">pred</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier hs-var">dsLExpr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141358"><span class="hs-identifier hs-var">guard_expr</span></a></span><span>
</span><span id="line-473"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681141354"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141354"><span class="hs-identifier hs-var">b1</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier hs-var">dsLExpr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141357"><span class="hs-identifier hs-var">then_expr</span></a></span><span>
</span><span id="line-474"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681141353"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141353"><span class="hs-identifier hs-var">b2</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier hs-var">dsLExpr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141356"><span class="hs-identifier hs-var">else_expr</span></a></span><span>
</span><span id="line-475"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; DsM CoreExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; DsM CoreExpr) -&gt; CoreExpr -&gt; DsM CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExpr -&gt; CoreExpr -&gt; CoreExpr
</span><a href="GHC.Core.Make.html#mkIfThenElse"><span class="hs-identifier hs-var">mkIfThenElse</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141355"><span class="hs-identifier hs-var">pred</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141354"><span class="hs-identifier hs-var">b1</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141353"><span class="hs-identifier hs-var">b2</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-476"></span><span>
</span><span id="line-477"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsMultiIf"><span class="hs-identifier hs-type">HsMultiIf</span></a></span><span> </span><span id="local-6989586621681141350"><span class="annot"><span class="annottext">XMultiIf GhcTc
</span><a href="#local-6989586621681141350"><span class="hs-identifier hs-var">res_ty</span></a></span></span><span> </span><span id="local-6989586621681141349"><span class="annot"><span class="annottext">[LGRHS GhcTc (LHsExpr GhcTc)]
</span><a href="#local-6989586621681141349"><span class="hs-identifier hs-var">alts</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-478"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">[LGRHS GhcTc (LHsExpr GhcTc)] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[LGRHS GhcTc (LHsExpr GhcTc)]
</span><a href="#local-6989586621681141349"><span class="hs-identifier hs-var">alts</span></a></span><span>
</span><span id="line-479"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DsM CoreExpr
</span><a href="#local-6989586621681141348"><span class="hs-identifier hs-var">mkErrorExpr</span></a></span><span>
</span><span id="line-480"></span><span>
</span><span id="line-481"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-482"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681141347"><span class="annot"><span class="annottext">grhss :: GRHSs GhcTc (LHsExpr GhcTc)
</span><a href="#local-6989586621681141347"><span class="hs-identifier hs-var hs-var">grhss</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">XCGRHSs GhcTc (LHsExpr GhcTc)
-&gt; [LGRHS GhcTc (LHsExpr GhcTc)]
-&gt; LHsLocalBinds GhcTc
-&gt; GRHSs GhcTc (LHsExpr GhcTc)
forall p body.
XCGRHSs p body -&gt; [LGRHS p body] -&gt; LHsLocalBinds p -&gt; GRHSs p body
</span><a href="GHC.Hs.Expr.html#GRHSs"><span class="hs-identifier hs-var">GRHSs</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XCGRHSs GhcTc (LHsExpr GhcTc)
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="annot"><span class="annottext">[LGRHS GhcTc (LHsExpr GhcTc)]
</span><a href="#local-6989586621681141349"><span class="hs-identifier hs-var">alts</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsLocalBindsLR GhcTc GhcTc -&gt; LHsLocalBinds GhcTc
forall e. e -&gt; Located e
</span><a href="GHC.Types.SrcLoc.html#noLoc"><span class="hs-identifier hs-var">noLoc</span></a></span><span> </span><span class="annot"><span class="annottext">HsLocalBindsLR GhcTc GhcTc
forall (a :: Pass) (b :: Pass).
HsLocalBindsLR (GhcPass a) (GhcPass b)
</span><a href="GHC.Hs.Binds.html#emptyLocalBinds"><span class="hs-identifier hs-var">emptyLocalBinds</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-483"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681141342"><span class="annot"><span class="annottext">[Deltas]
</span><a href="#local-6989586621681141342"><span class="hs-identifier hs-var">rhss_deltas</span></a></span></span><span>  </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HsMatchContext GhcRn -&gt; GRHSs GhcTc (LHsExpr GhcTc) -&gt; DsM [Deltas]
</span><a href="GHC.HsToCore.PmCheck.html#checkGuardMatches"><span class="hs-identifier hs-var">checkGuardMatches</span></a></span><span> </span><span class="annot"><span class="annottext">HsMatchContext GhcRn
forall p. HsMatchContext p
</span><a href="GHC.Hs.Expr.html#IfAlt"><span class="hs-identifier hs-var">IfAlt</span></a></span><span> </span><span class="annot"><span class="annottext">GRHSs GhcTc (LHsExpr GhcTc)
</span><a href="#local-6989586621681141347"><span class="hs-identifier hs-var">grhss</span></a></span><span>
</span><span id="line-484"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681141340"><span class="annot"><span class="annottext">MatchResult CoreExpr
</span><a href="#local-6989586621681141340"><span class="hs-identifier hs-var">match_result</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HsMatchContext GhcRn
-&gt; GRHSs GhcTc (LHsExpr GhcTc)
-&gt; Type
-&gt; Maybe (NonEmpty Deltas)
-&gt; DsM (MatchResult CoreExpr)
</span><a href="GHC.HsToCore.GuardedRHSs.html#dsGRHSs"><span class="hs-identifier hs-var">dsGRHSs</span></a></span><span> </span><span class="annot"><span class="annottext">HsMatchContext GhcRn
forall p. HsMatchContext p
</span><a href="GHC.Hs.Expr.html#IfAlt"><span class="hs-identifier hs-var">IfAlt</span></a></span><span> </span><span class="annot"><span class="annottext">GRHSs GhcTc (LHsExpr GhcTc)
</span><a href="#local-6989586621681141347"><span class="hs-identifier hs-var">grhss</span></a></span><span> </span><span class="annot"><span class="annottext">Type
XMultiIf GhcTc
</span><a href="#local-6989586621681141350"><span class="hs-identifier hs-var">res_ty</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Deltas] -&gt; Maybe (NonEmpty Deltas)
forall a. [a] -&gt; Maybe (NonEmpty a)
</span><a href="../../base/src/Data.List.NonEmpty.html#nonEmpty"><span class="hs-identifier hs-var">nonEmpty</span></a></span><span> </span><span class="annot"><span class="annottext">[Deltas]
</span><a href="#local-6989586621681141342"><span class="hs-identifier hs-var">rhss_deltas</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-485"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681141338"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141338"><span class="hs-identifier hs-var">error_expr</span></a></span></span><span>   </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">DsM CoreExpr
</span><a href="#local-6989586621681141348"><span class="hs-identifier hs-var">mkErrorExpr</span></a></span><span>
</span><span id="line-486"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">MatchResult CoreExpr -&gt; CoreExpr -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Utils.html#extractMatchResult"><span class="hs-identifier hs-var">extractMatchResult</span></a></span><span> </span><span class="annot"><span class="annottext">MatchResult CoreExpr
</span><a href="#local-6989586621681141340"><span class="hs-identifier hs-var">match_result</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141338"><span class="hs-identifier hs-var">error_expr</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-487"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-488"></span><span>    </span><span id="local-6989586621681141348"><span class="annot"><span class="annottext">mkErrorExpr :: DsM CoreExpr
</span><a href="#local-6989586621681141348"><span class="hs-identifier hs-var hs-var">mkErrorExpr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Type -&gt; SDoc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Utils.html#mkErrorAppDs"><span class="hs-identifier hs-var">mkErrorAppDs</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="GHC.Core.Make.html#nON_EXHAUSTIVE_GUARDS_ERROR_ID"><span class="hs-identifier hs-var">nON_EXHAUSTIVE_GUARDS_ERROR_ID</span></a></span><span> </span><span class="annot"><span class="annottext">Type
XMultiIf GhcTc
</span><a href="#local-6989586621681141350"><span class="hs-identifier hs-var">res_ty</span></a></span><span>
</span><span id="line-489"></span><span>                               </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;multi-way if&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-490"></span><span>
</span><span id="line-491"></span><span class="hs-comment">{-
\noindent
\underline{\bf Various data construction things}
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-}</span><span>
</span><span id="line-496"></span><span>
</span><span id="line-497"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#ExplicitList"><span class="hs-identifier hs-type">ExplicitList</span></a></span><span> </span><span id="local-6989586621681141333"><span class="annot"><span class="annottext">XExplicitList GhcTc
</span><a href="#local-6989586621681141333"><span class="hs-identifier hs-var">elt_ty</span></a></span></span><span> </span><span id="local-6989586621681141332"><span class="annot"><span class="annottext">Maybe (SyntaxExpr GhcTc)
</span><a href="#local-6989586621681141332"><span class="hs-identifier hs-var">wit</span></a></span></span><span> </span><span id="local-6989586621681141331"><span class="annot"><span class="annottext">[LHsExpr GhcTc]
</span><a href="#local-6989586621681141331"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-498"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type -&gt; Maybe (SyntaxExpr GhcTc) -&gt; [LHsExpr GhcTc] -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsExplicitList"><span class="hs-identifier hs-var">dsExplicitList</span></a></span><span> </span><span class="annot"><span class="annottext">Type
XExplicitList GhcTc
</span><a href="#local-6989586621681141333"><span class="hs-identifier hs-var">elt_ty</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (SyntaxExpr GhcTc)
</span><a href="#local-6989586621681141332"><span class="hs-identifier hs-var">wit</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsExpr GhcTc]
</span><a href="#local-6989586621681141331"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-499"></span><span>
</span><span id="line-500"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#ArithSeq"><span class="hs-identifier hs-type">ArithSeq</span></a></span><span> </span><span id="local-6989586621681141328"><span class="annot"><span class="annottext">XArithSeq GhcTc
</span><a href="#local-6989586621681141328"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span id="local-6989586621681141327"><span class="annot"><span class="annottext">Maybe (SyntaxExpr GhcTc)
</span><a href="#local-6989586621681141327"><span class="hs-identifier hs-var">witness</span></a></span></span><span> </span><span id="local-6989586621681141326"><span class="annot"><span class="annottext">ArithSeqInfo GhcTc
</span><a href="#local-6989586621681141326"><span class="hs-identifier hs-var">seq</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-501"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe (SyntaxExpr GhcTc)
</span><a href="#local-6989586621681141327"><span class="hs-identifier hs-var">witness</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-502"></span><span>     </span><span class="annot"><span class="annottext">Maybe (SyntaxExpr GhcTc)
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc -&gt; ArithSeqInfo GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsArithSeq"><span class="hs-identifier hs-var">dsArithSeq</span></a></span><span> </span><span class="annot"><span class="annottext">XArithSeq GhcTc
HsExpr GhcTc
</span><a href="#local-6989586621681141328"><span class="hs-identifier hs-var">expr</span></a></span><span> </span><span class="annot"><span class="annottext">ArithSeqInfo GhcTc
</span><a href="#local-6989586621681141326"><span class="hs-identifier hs-var">seq</span></a></span><span>
</span><span id="line-503"></span><span>     </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681141324"><span class="annot"><span class="annottext">SyntaxExpr GhcTc
</span><a href="#local-6989586621681141324"><span class="hs-identifier hs-var">fl</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681141323"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141323"><span class="hs-identifier hs-var">newArithSeq</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc -&gt; ArithSeqInfo GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsArithSeq"><span class="hs-identifier hs-var">dsArithSeq</span></a></span><span> </span><span class="annot"><span class="annottext">XArithSeq GhcTc
HsExpr GhcTc
</span><a href="#local-6989586621681141328"><span class="hs-identifier hs-var">expr</span></a></span><span> </span><span class="annot"><span class="annottext">ArithSeqInfo GhcTc
</span><a href="#local-6989586621681141326"><span class="hs-identifier hs-var">seq</span></a></span><span>
</span><span id="line-504"></span><span>                   </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">SyntaxExpr GhcTc -&gt; [CoreExpr] -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsSyntaxExpr"><span class="hs-identifier hs-var">dsSyntaxExpr</span></a></span><span> </span><span class="annot"><span class="annottext">SyntaxExpr GhcTc
</span><a href="#local-6989586621681141324"><span class="hs-identifier hs-var">fl</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141323"><span class="hs-identifier hs-var">newArithSeq</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-505"></span><span>
</span><span id="line-506"></span><span class="hs-comment">{-
Static Pointers
~~~~~~~~~~~~~~~

See Note [Grand plan for static forms] in GHC.Iface.Tidy.StaticPtrTable for an overview.

    g = ... static f ...
==&gt;
    g = ... makeStatic loc f ...
-}</span><span>
</span><span id="line-516"></span><span>
</span><span id="line-517"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsStatic"><span class="hs-identifier hs-type">HsStatic</span></a></span><span> </span><span class="annot"><span class="annottext">XStatic GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141321"><span class="annot"><span class="annottext">expr :: LHsExpr GhcTc
</span><a href="#local-6989586621681141321"><span class="hs-identifier hs-var">expr</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681141320"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681141320"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-518"></span><span>    </span><span id="local-6989586621681141319"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141319"><span class="hs-identifier hs-var">expr_ds</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExprNoLP"><span class="hs-identifier hs-var">dsLExprNoLP</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141321"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-519"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681141318"><span class="annot"><span class="annottext">ty :: Type
</span><a href="#local-6989586621681141318"><span class="hs-identifier hs-var hs-var">ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; Type
</span><a href="GHC.Core.Utils.html#exprType"><span class="hs-identifier hs-var">exprType</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141319"><span class="hs-identifier hs-var">expr_ds</span></a></span><span>
</span><span id="line-520"></span><span>    </span><span id="local-6989586621681141317"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141317"><span class="hs-identifier hs-var">makeStaticId</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Name -&gt; DsM Id
</span><a href="GHC.HsToCore.Monad.html#dsLookupGlobalId"><span class="hs-identifier hs-var">dsLookupGlobalId</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="GHC.Builtin.Names.html#makeStaticName"><span class="hs-identifier hs-var">makeStaticName</span></a></span><span>
</span><span id="line-521"></span><span>
</span><span id="line-522"></span><span>    </span><span id="local-6989586621681141314"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681141314"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env DsGblEnv DsLclEnv) DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-523"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681141312"><span class="annot"><span class="annottext">platform :: Platform
</span><a href="#local-6989586621681141312"><span class="hs-identifier hs-var hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Platform
</span><a href="GHC.Driver.Session.html#targetPlatform"><span class="hs-identifier hs-var hs-var">targetPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681141314"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-524"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681141310"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681141310"><span class="hs-identifier hs-var">line</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681141309"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681141309"><span class="hs-identifier hs-var">col</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681141320"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-525"></span><span>           </span><span class="annot"><a href="GHC.Types.SrcLoc.html#RealSrcSpan"><span class="hs-identifier hs-type">RealSrcSpan</span></a></span><span> </span><span id="local-6989586621681141307"><span class="annot"><span class="annottext">RealSrcSpan
</span><a href="#local-6989586621681141307"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe BufSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-526"></span><span>                            </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">RealSrcLoc -&gt; Int
</span><a href="GHC.Types.SrcLoc.html#srcLocLine"><span class="hs-identifier hs-var">srcLocLine</span></a></span><span> </span><span class="annot"><span class="annottext">(RealSrcLoc -&gt; Int) -&gt; RealSrcLoc -&gt; Int
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">RealSrcSpan -&gt; RealSrcLoc
</span><a href="GHC.Types.SrcLoc.html#realSrcSpanStart"><span class="hs-identifier hs-var">realSrcSpanStart</span></a></span><span> </span><span class="annot"><span class="annottext">RealSrcSpan
</span><a href="#local-6989586621681141307"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-527"></span><span>                            </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">RealSrcLoc -&gt; Int
</span><a href="GHC.Types.SrcLoc.html#srcLocCol"><span class="hs-identifier hs-var">srcLocCol</span></a></span><span>  </span><span class="annot"><span class="annottext">(RealSrcLoc -&gt; Int) -&gt; RealSrcLoc -&gt; Int
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">RealSrcSpan -&gt; RealSrcLoc
</span><a href="GHC.Types.SrcLoc.html#realSrcSpanStart"><span class="hs-identifier hs-var">realSrcSpanStart</span></a></span><span> </span><span class="annot"><span class="annottext">RealSrcSpan
</span><a href="#local-6989586621681141307"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-528"></span><span>                            </span><span class="hs-special">)</span><span>
</span><span id="line-529"></span><span>           </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span>
</span><span id="line-530"></span><span>        </span><span id="local-6989586621681141303"><span class="annot"><span class="annottext">srcLoc :: CoreExpr
</span><a href="#local-6989586621681141303"><span class="hs-identifier hs-var hs-var">srcLoc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; [CoreExpr] -&gt; CoreExpr
</span><a href="GHC.Core.Make.html#mkCoreConApps"><span class="hs-identifier hs-var">mkCoreConApps</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Boxity -&gt; Int -&gt; DataCon
</span><a href="GHC.Builtin.Types.html#tupleDataCon"><span class="hs-identifier hs-var">tupleDataCon</span></a></span><span> </span><span class="annot"><span class="annottext">Boxity
</span><a href="GHC.Types.Basic.html#Boxed"><span class="hs-identifier hs-var">Boxed</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span class="hs-special">)</span><span>
</span><span id="line-531"></span><span>                     </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Type -&gt; CoreExpr
forall b. Type -&gt; Expr b
</span><a href="GHC.Core.html#Type"><span class="hs-identifier hs-var">Type</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Builtin.Types.html#intTy"><span class="hs-identifier hs-var">intTy</span></a></span><span>              </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type -&gt; CoreExpr
forall b. Type -&gt; Expr b
</span><a href="GHC.Core.html#Type"><span class="hs-identifier hs-var">Type</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Builtin.Types.html#intTy"><span class="hs-identifier hs-var">intTy</span></a></span><span>
</span><span id="line-532"></span><span>                     </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Int -&gt; CoreExpr
</span><a href="GHC.Core.Make.html#mkIntExprInt"><span class="hs-identifier hs-var">mkIntExprInt</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681141312"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681141310"><span class="hs-identifier hs-var">line</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Int -&gt; CoreExpr
</span><a href="GHC.Core.Make.html#mkIntExprInt"><span class="hs-identifier hs-var">mkIntExprInt</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681141312"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681141309"><span class="hs-identifier hs-var">col</span></a></span><span>
</span><span id="line-533"></span><span>                     </span><span class="hs-special">]</span><span>
</span><span id="line-534"></span><span>
</span><span id="line-535"></span><span>    </span><span class="annot"><span class="annottext">SrcSpan -&gt; DsM CoreExpr -&gt; DsM CoreExpr
forall a. SrcSpan -&gt; DsM a -&gt; DsM a
</span><a href="GHC.HsToCore.Monad.html#putSrcSpanDs"><span class="hs-identifier hs-var">putSrcSpanDs</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681141320"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">(DsM CoreExpr -&gt; DsM CoreExpr) -&gt; DsM CoreExpr -&gt; DsM CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; DsM CoreExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; DsM CoreExpr) -&gt; CoreExpr -&gt; DsM CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-536"></span><span>      </span><span class="annot"><span class="annottext">CoreExpr -&gt; [CoreExpr] -&gt; CoreExpr
</span><a href="GHC.Core.Make.html#mkCoreApps"><span class="hs-identifier hs-var">mkCoreApps</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; CoreExpr
forall b. Id -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141317"><span class="hs-identifier hs-var">makeStaticId</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Type -&gt; CoreExpr
forall b. Type -&gt; Expr b
</span><a href="GHC.Core.html#Type"><span class="hs-identifier hs-var">Type</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681141318"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141303"><span class="hs-identifier hs-var">srcLoc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141319"><span class="hs-identifier hs-var">expr_ds</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-537"></span><span>
</span><span id="line-538"></span><span class="hs-comment">{-
\noindent
\underline{\bf Record construction and update}
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For record construction we do this (assuming T has three arguments)
\begin{verbatim}
        T { op2 = e }
==&gt;
        let err = /\a -&gt; recConErr a
        T (recConErr t1 &quot;M.hs/230/op1&quot;)
          e
          (recConErr t1 &quot;M.hs/230/op3&quot;)
\end{verbatim}
@recConErr@ then converts its argument string into a proper message
before printing it as
\begin{verbatim}
        M.hs, line 230: missing field op1 was evaluated
\end{verbatim}

We also handle @C{}@ as valid construction syntax for an unlabelled
constructor @C@, setting all of @C@'s fields to bottom.
-}</span><span>
</span><span id="line-560"></span><span>
</span><span id="line-561"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#RecordCon"><span class="hs-identifier hs-type">RecordCon</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">rcon_flds :: forall p. HsExpr p -&gt; HsRecordBinds p
</span><a href="GHC.Hs.Expr.html#rcon_flds"><span class="hs-identifier hs-var">rcon_flds</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681141293"><span class="annot"><span class="annottext">HsRecordBinds GhcTc
</span><a href="#local-6989586621681141293"><span class="hs-identifier hs-var">rbinds</span></a></span></span><span>
</span><span id="line-562"></span><span>                  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">rcon_ext :: forall p. HsExpr p -&gt; XRecordCon p
</span><a href="GHC.Hs.Expr.html#rcon_ext"><span class="hs-identifier hs-var">rcon_ext</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#RecordConTc"><span class="hs-identifier hs-type">RecordConTc</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">rcon_con_expr :: RecordConTc -&gt; HsExpr GhcTc
</span><a href="GHC.Hs.Expr.html#rcon_con_expr"><span class="hs-identifier hs-var">rcon_con_expr</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681141289"><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681141289"><span class="hs-identifier hs-var">con_expr</span></a></span></span><span>
</span><span id="line-563"></span><span>                                           </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">rcon_con_like :: RecordConTc -&gt; ConLike
</span><a href="GHC.Hs.Expr.html#rcon_con_like"><span class="hs-identifier hs-var">rcon_con_like</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681141287"><span class="annot"><span class="annottext">ConLike
</span><a href="#local-6989586621681141287"><span class="hs-identifier hs-var">con_like</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-564"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681141286"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141286"><span class="hs-identifier hs-var">con_expr'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681141289"><span class="hs-identifier hs-var">con_expr</span></a></span><span>
</span><span id="line-565"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-566"></span><span>             </span><span class="hs-special">(</span><span id="local-6989586621681141285"><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621681141285"><span class="hs-identifier hs-var">arg_tys</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type -&gt; ([Scaled Type], Type)
</span><a href="GHC.Tc.Utils.TcType.html#tcSplitFunTys"><span class="hs-identifier hs-var">tcSplitFunTys</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreExpr -&gt; Type
</span><a href="GHC.Core.Utils.html#exprType"><span class="hs-identifier hs-var">exprType</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141286"><span class="hs-identifier hs-var">con_expr'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-567"></span><span>             </span><span class="hs-comment">-- A newtype in the corner should be opaque;</span><span>
</span><span id="line-568"></span><span>             </span><span class="hs-comment">-- hence TcType.tcSplitFunTys</span><span>
</span><span id="line-569"></span><span>
</span><span id="line-570"></span><span>             </span><span id="local-6989586621681141283"><span class="annot"><span class="annottext">mk_arg :: (Type, FieldLbl Name) -&gt; DsM CoreExpr
</span><a href="#local-6989586621681141283"><span class="hs-identifier hs-var hs-var">mk_arg</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681141282"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681141282"><span class="hs-identifier hs-var">arg_ty</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681141281"><span class="annot"><span class="annottext">FieldLbl Name
</span><a href="#local-6989586621681141281"><span class="hs-identifier hs-var">fl</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-571"></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[LHsRecField GhcTc (LHsExpr GhcTc)] -&gt; Name -&gt; [LHsExpr GhcTc]
forall arg. [LHsRecField GhcTc arg] -&gt; Name -&gt; [arg]
</span><a href="GHC.HsToCore.Expr.html#findField"><span class="hs-identifier hs-var">findField</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsRecordBinds GhcTc -&gt; [LHsRecField GhcTc (LHsExpr GhcTc)]
forall p arg. HsRecFields p arg -&gt; [LHsRecField p arg]
</span><a href="GHC.Hs.Pat.html#rec_flds"><span class="hs-identifier hs-var hs-var">rec_flds</span></a></span><span> </span><span class="annot"><span class="annottext">HsRecordBinds GhcTc
</span><a href="#local-6989586621681141293"><span class="hs-identifier hs-var">rbinds</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldLbl Name -&gt; Name
forall a. FieldLbl a -&gt; a
</span><a href="GHC.Types.FieldLabel.html#flSelector"><span class="hs-identifier hs-var hs-var">flSelector</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLbl Name
</span><a href="#local-6989586621681141281"><span class="hs-identifier hs-var">fl</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-572"></span><span>                   </span><span class="hs-special">(</span><span id="local-6989586621681141277"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141277"><span class="hs-identifier hs-var">rhs</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621681141276"><span class="annot"><span class="annottext">[LHsExpr GhcTc]
</span><a href="#local-6989586621681141276"><span class="hs-identifier hs-var">rhss</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">null</span><span> </span><span class="hs-identifier">rhss</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-573"></span><span>                                 </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExprNoLP"><span class="hs-identifier hs-var">dsLExprNoLP</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141277"><span class="hs-identifier hs-var">rhs</span></a></span><span>
</span><span id="line-574"></span><span>                   </span><span class="hs-special">[</span><span class="hs-special">]</span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Type -&gt; SDoc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Utils.html#mkErrorAppDs"><span class="hs-identifier hs-var">mkErrorAppDs</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="GHC.Core.Make.html#rEC_CON_ERROR_ID"><span class="hs-identifier hs-var">rEC_CON_ERROR_ID</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681141282"><span class="hs-identifier hs-var">arg_ty</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldLabelString -&gt; SDoc
forall {a}. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldLbl Name -&gt; FieldLabelString
forall a. FieldLbl a -&gt; FieldLabelString
</span><a href="GHC.Types.FieldLabel.html#flLabel"><span class="hs-identifier hs-var hs-var">flLabel</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLbl Name
</span><a href="#local-6989586621681141281"><span class="hs-identifier hs-var">fl</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-575"></span><span>             </span><span id="local-6989586621681141273"><span class="annot"><span class="annottext">unlabelled_bottom :: Type -&gt; DsM CoreExpr
</span><a href="#local-6989586621681141273"><span class="hs-identifier hs-var hs-var">unlabelled_bottom</span></a></span></span><span> </span><span id="local-6989586621681141272"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681141272"><span class="hs-identifier hs-var">arg_ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Type -&gt; SDoc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Utils.html#mkErrorAppDs"><span class="hs-identifier hs-var">mkErrorAppDs</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="GHC.Core.Make.html#rEC_CON_ERROR_ID"><span class="hs-identifier hs-var">rEC_CON_ERROR_ID</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681141272"><span class="hs-identifier hs-var">arg_ty</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">Outputable.empty</span></a></span><span>
</span><span id="line-576"></span><span>
</span><span id="line-577"></span><span>             </span><span id="local-6989586621681141270"><span class="annot"><span class="annottext">labels :: [FieldLbl Name]
</span><a href="#local-6989586621681141270"><span class="hs-identifier hs-var hs-var">labels</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConLike -&gt; [FieldLbl Name]
</span><a href="GHC.Core.ConLike.html#conLikeFieldLabels"><span class="hs-identifier hs-var">conLikeFieldLabels</span></a></span><span> </span><span class="annot"><span class="annottext">ConLike
</span><a href="#local-6989586621681141287"><span class="hs-identifier hs-var">con_like</span></a></span><span>
</span><span id="line-578"></span><span>
</span><span id="line-579"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681141268"><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621681141268"><span class="hs-identifier hs-var">con_args</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">[FieldLbl Name] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLbl Name]
</span><a href="#local-6989586621681141270"><span class="hs-identifier hs-var">labels</span></a></span><span>
</span><span id="line-580"></span><span>                     </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">(Type -&gt; DsM CoreExpr) -&gt; [Type] -&gt; DsM [CoreExpr]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; DsM CoreExpr
</span><a href="#local-6989586621681141273"><span class="hs-identifier hs-var">unlabelled_bottom</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Scaled Type -&gt; Type) -&gt; [Scaled Type] -&gt; [Type]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Scaled Type -&gt; Type
forall a. Scaled a -&gt; a
</span><a href="GHC.Core.TyCo.Rep.html#scaledThing"><span class="hs-identifier hs-var">scaledThing</span></a></span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621681141285"><span class="hs-identifier hs-var">arg_tys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-581"></span><span>                     </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">((Type, FieldLbl Name) -&gt; DsM CoreExpr)
-&gt; [(Type, FieldLbl Name)] -&gt; DsM [CoreExpr]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">(Type, FieldLbl Name) -&gt; DsM CoreExpr
</span><a href="#local-6989586621681141283"><span class="hs-identifier hs-var">mk_arg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; [Type] -&gt; [FieldLbl Name] -&gt; [(Type, FieldLbl Name)]
forall a b. String -&gt; [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="GHC.Utils.Misc.html#zipEqual"><span class="hs-identifier hs-var">zipEqual</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dsExpr:RecordCon&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Scaled Type -&gt; Type) -&gt; [Scaled Type] -&gt; [Type]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Scaled Type -&gt; Type
forall a. Scaled a -&gt; a
</span><a href="GHC.Core.TyCo.Rep.html#scaledThing"><span class="hs-identifier hs-var">scaledThing</span></a></span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621681141285"><span class="hs-identifier hs-var">arg_tys</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[FieldLbl Name]
</span><a href="#local-6989586621681141270"><span class="hs-identifier hs-var">labels</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-582"></span><span>
</span><span id="line-583"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; DsM CoreExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreExpr -&gt; [CoreExpr] -&gt; CoreExpr
</span><a href="GHC.Core.Make.html#mkCoreApps"><span class="hs-identifier hs-var">mkCoreApps</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141286"><span class="hs-identifier hs-var">con_expr'</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621681141268"><span class="hs-identifier hs-var">con_args</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-584"></span><span>
</span><span id="line-585"></span><span class="hs-comment">{-
Record update is a little harder. Suppose we have the decl:
\begin{verbatim}
        data T = T1 {op1, op2, op3 :: Int}
               | T2 {op4, op2 :: Int}
               | T3
\end{verbatim}
Then we translate as follows:
\begin{verbatim}
        r { op2 = e }
===&gt;
        let op2 = e in
        case r of
          T1 op1 _ op3 -&gt; T1 op1 op2 op3
          T2 op4 _     -&gt; T2 op4 op2
          other        -&gt; recUpdError &quot;M.hs/230&quot;
\end{verbatim}
It's important that we use the constructor Ids for @T1@, @T2@ etc on the
RHSs, and do not generate a Core constructor application directly, because the constructor
might do some argument-evaluation first; and may have to throw away some
dictionaries.

Note [Update for GADTs]
~~~~~~~~~~~~~~~~~~~~~~~
Consider
   data T a b where
     MkT :: { foo :: a } -&gt; T a Int

   upd :: T s t -&gt; s -&gt; T s t
   upd z y = z { foo = y}

We need to get this:
   $WMkT :: a -&gt; T a Int
   MkT   :: (b ~# Int) =&gt; a -&gt; T a b

   upd = /\s t. \(z::T s t) (y::s) -&gt;
         case z of
            MkT (co :: t ~# Int) _ -&gt; $WMkT @s y |&gt; T (Refl s) (Sym co)

Note the final cast
   T (Refl s) (Sym co) :: T s Int ~ T s t
which uses co, bound by the GADT match.  This is the wrap_co coercion
in wrapped_rhs. How do we produce it?

* Start with raw materials
    tc, the tycon:                                       T
    univ_tvs, the universally quantified tyvars of MkT:  a,b
  NB: these are in 1-1 correspondence with the tyvars of tc

* Form univ_cos, a coercion for each of tc's args: (Refl s) (Sym co)
  We replaced
     a  by  (Refl s)    since 's' instantiates 'a'
     b  by  (Sym co)   since 'b' is in the data-con's EqSpec

* Then form the coercion T (Refl s) (Sym co)

It gets more complicated when data families are involved (#18809).
Consider
    data family F x
    data instance F (a,b) where
      MkF :: { foo :: Int } -&gt; F (Int,b)

    bar :: F (s,t) -&gt; Int -&gt; F (s,t)
    bar z y = z { foo = y}

We have
    data R:FPair a b where
      MkF :: { foo :: Int } -&gt; R:FPair Int b

    $WMkF :: Int -&gt; F (Int,b)
    MkF :: forall a b. (a ~# Int) =&gt; Int -&gt; R:FPair a b

    bar :: F (s,t) -&gt; Int -&gt; F (s,t)
    bar = /\s t. \(z::F (s,t)) \(y::Int) -&gt;
         case z |&gt; co1 of
            MkF (co2::s ~# Int) _ -&gt; $WMkF @t y |&gt; co3

(Side note: here (z |&gt; co1) is built by typechecking the scrutinee, so
we ignore it here.  In general the scrutinee is an aribtrary expression.)

The question is: what is co3, the cast for the RHS?
      co3 :: F (Int,t) ~ F (s,t)
Again, we can construct it using co2, bound by the GADT match.
We do /exactly/ the same as the non-family case up to building
univ_cos.  But that gives us
     rep_tc:   R:FPair
     univ_cos: (Sym co2)   (Refl t)
But then we use mkTcFamilyTyConAppCo to &quot;lift&quot; this to the coercion
we want, namely
     F (Sym co2, Refl t) :: F (Int,t) ~ F (s,t)

-}</span><span>
</span><span id="line-677"></span><span>
</span><span id="line-678"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span id="local-6989586621681141265"><span class="annot"><span class="annottext">expr :: HsExpr GhcTc
</span><a href="#local-6989586621681141265"><span class="hs-identifier hs-var">expr</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#RecordUpd"><span class="hs-identifier hs-type">RecordUpd</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">rupd_expr :: forall p. HsExpr p -&gt; LHsExpr p
</span><a href="GHC.Hs.Expr.html#rupd_expr"><span class="hs-identifier hs-var">rupd_expr</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681141262"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141262"><span class="hs-identifier hs-var">record_expr</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">rupd_flds :: forall p. HsExpr p -&gt; [LHsRecUpdField p]
</span><a href="GHC.Hs.Expr.html#rupd_flds"><span class="hs-identifier hs-var">rupd_flds</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681141260"><span class="annot"><span class="annottext">[LHsRecUpdField GhcTc]
</span><a href="#local-6989586621681141260"><span class="hs-identifier hs-var">fields</span></a></span></span><span>
</span><span id="line-679"></span><span>                       </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">rupd_ext :: forall p. HsExpr p -&gt; XRecordUpd p
</span><a href="GHC.Hs.Expr.html#rupd_ext"><span class="hs-identifier hs-var">rupd_ext</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#RecordUpdTc"><span class="hs-identifier hs-type">RecordUpdTc</span></a></span><span>
</span><span id="line-680"></span><span>                           </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">rupd_cons :: RecordUpdTc -&gt; [ConLike]
</span><a href="GHC.Hs.Expr.html#rupd_cons"><span class="hs-identifier hs-var">rupd_cons</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681141256"><span class="annot"><span class="annottext">[ConLike]
</span><a href="#local-6989586621681141256"><span class="hs-identifier hs-var">cons_to_upd</span></a></span></span><span>
</span><span id="line-681"></span><span>                           </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">rupd_in_tys :: RecordUpdTc -&gt; [Type]
</span><a href="GHC.Hs.Expr.html#rupd_in_tys"><span class="hs-identifier hs-var">rupd_in_tys</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681141254"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621681141254"><span class="hs-identifier hs-var">in_inst_tys</span></a></span></span><span>
</span><span id="line-682"></span><span>                           </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">rupd_out_tys :: RecordUpdTc -&gt; [Type]
</span><a href="GHC.Hs.Expr.html#rupd_out_tys"><span class="hs-identifier hs-var">rupd_out_tys</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681141252"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621681141252"><span class="hs-identifier hs-var">out_inst_tys</span></a></span></span><span>
</span><span id="line-683"></span><span>                           </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">rupd_wrap :: RecordUpdTc -&gt; HsWrapper
</span><a href="GHC.Hs.Expr.html#rupd_wrap"><span class="hs-identifier hs-var">rupd_wrap</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681141250"><span class="annot"><span class="annottext">HsWrapper
</span><a href="#local-6989586621681141250"><span class="hs-identifier hs-var">dict_req_wrap</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">}</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-684"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">[LHsRecUpdField GhcTc] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsRecUpdField GhcTc]
</span><a href="#local-6989586621681141260"><span class="hs-identifier hs-var">fields</span></a></span><span>
</span><span id="line-685"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier hs-var">dsLExpr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141262"><span class="hs-identifier hs-var">record_expr</span></a></span><span>
</span><span id="line-686"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-687"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT2</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">notNull</span><span> </span><span class="hs-identifier">cons_to_upd</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">expr</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-688"></span><span>
</span><span id="line-689"></span><span>    </span><span class="hs-keyword">do</span><span>  </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681141248"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141248"><span class="hs-identifier hs-var">record_expr'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier hs-var">dsLExpr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141262"><span class="hs-identifier hs-var">record_expr</span></a></span><span>
</span><span id="line-690"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681141247"><span class="annot"><span class="annottext">[(Name, Id, CoreExpr)]
</span><a href="#local-6989586621681141247"><span class="hs-identifier hs-var">field_binds'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(LHsRecUpdField GhcTc
 -&gt; IOEnv (Env DsGblEnv DsLclEnv) (Name, Id, CoreExpr))
-&gt; [LHsRecUpdField GhcTc]
-&gt; IOEnv (Env DsGblEnv DsLclEnv) [(Name, Id, CoreExpr)]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">LHsRecUpdField GhcTc
-&gt; IOEnv (Env DsGblEnv DsLclEnv) (Name, Id, CoreExpr)
</span><a href="#local-6989586621681141246"><span class="hs-identifier hs-var">ds_field</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsRecUpdField GhcTc]
</span><a href="#local-6989586621681141260"><span class="hs-identifier hs-var">fields</span></a></span><span>
</span><span id="line-691"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="annot"><a href="#local-6989586621681141245"><span class="hs-identifier hs-type">upd_fld_env</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.Env.html#NameEnv"><span class="hs-identifier hs-type">NameEnv</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-comment">-- Maps field name to the LocalId of the field binding</span><span>
</span><span id="line-692"></span><span>              </span><span id="local-6989586621681141245"><span class="annot"><span class="annottext">upd_fld_env :: NameEnv Id
</span><a href="#local-6989586621681141245"><span class="hs-identifier hs-var hs-var">upd_fld_env</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(Name, Id)] -&gt; NameEnv Id
forall a. [(Name, a)] -&gt; NameEnv a
</span><a href="GHC.Types.Name.Env.html#mkNameEnv"><span class="hs-identifier hs-var">mkNameEnv</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681141243"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141242"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681141243"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681141243"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681141242"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141242"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">CoreExpr
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[(Name, Id, CoreExpr)]
</span><a href="#local-6989586621681141247"><span class="hs-identifier hs-var">field_binds'</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-693"></span><span>
</span><span id="line-694"></span><span>        </span><span class="hs-comment">-- It's important to generate the match with matchWrapper,</span><span>
</span><span id="line-695"></span><span>        </span><span class="hs-comment">-- and the right hand sides with applications of the wrapper Id</span><span>
</span><span id="line-696"></span><span>        </span><span class="hs-comment">-- so that everything works when we are doing fancy unboxing on the</span><span>
</span><span id="line-697"></span><span>        </span><span class="hs-comment">-- constructor arguments.</span><span>
</span><span id="line-698"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681141241"><span class="annot"><span class="annottext">[LMatch GhcTc (LHsExpr GhcTc)]
</span><a href="#local-6989586621681141241"><span class="hs-identifier hs-var">alts</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(ConLike
 -&gt; IOEnv (Env DsGblEnv DsLclEnv) (LMatch GhcTc (LHsExpr GhcTc)))
-&gt; [ConLike]
-&gt; IOEnv (Env DsGblEnv DsLclEnv) [LMatch GhcTc (LHsExpr GhcTc)]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NameEnv Id
-&gt; ConLike
-&gt; IOEnv (Env DsGblEnv DsLclEnv) (LMatch GhcTc (LHsExpr GhcTc))
</span><a href="#local-6989586621681141240"><span class="hs-identifier hs-var">mk_alt</span></a></span><span> </span><span class="annot"><span class="annottext">NameEnv Id
</span><a href="#local-6989586621681141245"><span class="hs-identifier hs-var">upd_fld_env</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[ConLike]
</span><a href="#local-6989586621681141256"><span class="hs-identifier hs-var">cons_to_upd</span></a></span><span>
</span><span id="line-699"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span id="local-6989586621681141239"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141239"><span class="hs-identifier hs-var">discrim_var</span></a></span></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span id="local-6989586621681141238"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141238"><span class="hs-identifier hs-var">matching_code</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-700"></span><span>                </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HsMatchContext GhcRn
-&gt; Maybe (LHsExpr GhcTc)
-&gt; MatchGroup GhcTc (LHsExpr GhcTc)
-&gt; DsM ([Id], CoreExpr)
</span><a href="GHC.HsToCore.Match.html#matchWrapper"><span class="hs-identifier hs-var">matchWrapper</span></a></span><span> </span><span class="annot"><span class="annottext">HsMatchContext GhcRn
forall p. HsMatchContext p
</span><a href="GHC.Hs.Expr.html#RecUpd"><span class="hs-identifier hs-var">RecUpd</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; Maybe (LHsExpr GhcTc)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141262"><span class="hs-identifier hs-var">record_expr</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- See Note [Scrutinee in Record updates]</span><span>
</span><span id="line-701"></span><span>                                      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MG :: forall p body.
XMG p body
-&gt; Located [LMatch p body] -&gt; Origin -&gt; MatchGroup p body
</span><a href="GHC.Hs.Expr.html#MG"><span class="hs-identifier hs-type">MG</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">mg_alts :: Located [LMatch GhcTc (LHsExpr GhcTc)]
</span><a href="GHC.Hs.Expr.html#mg_alts"><span class="hs-identifier hs-var">mg_alts</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[LMatch GhcTc (LHsExpr GhcTc)]
-&gt; Located [LMatch GhcTc (LHsExpr GhcTc)]
forall e. e -&gt; Located e
</span><a href="GHC.Types.SrcLoc.html#noLoc"><span class="hs-identifier hs-var">noLoc</span></a></span><span> </span><span class="annot"><span class="annottext">[LMatch GhcTc (LHsExpr GhcTc)]
</span><a href="#local-6989586621681141241"><span class="hs-identifier hs-var">alts</span></a></span><span>
</span><span id="line-702"></span><span>                                          </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mg_ext :: XMG GhcTc (LHsExpr GhcTc)
</span><a href="GHC.Hs.Expr.html#mg_ext"><span class="hs-identifier hs-var">mg_ext</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Scaled Type] -&gt; Type -&gt; MatchGroupTc
</span><a href="GHC.Hs.Expr.html#MatchGroupTc"><span class="hs-identifier hs-var">MatchGroupTc</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Type -&gt; Scaled Type
forall a. a -&gt; Scaled a
</span><a href="GHC.Core.Type.html#unrestricted"><span class="hs-identifier hs-var">unrestricted</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681141231"><span class="hs-identifier hs-var">in_ty</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681141230"><span class="hs-identifier hs-var">out_ty</span></a></span><span>
</span><span id="line-703"></span><span>                                          </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mg_origin :: Origin
</span><a href="GHC.Hs.Expr.html#mg_origin"><span class="hs-identifier hs-var">mg_origin</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Origin
</span><a href="GHC.Types.Basic.html#FromSource"><span class="hs-identifier hs-var">FromSource</span></a></span><span>
</span><span id="line-704"></span><span>                                          </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-705"></span><span>                                     </span><span class="hs-comment">-- FromSource is not strictly right, but we</span><span>
</span><span id="line-706"></span><span>                                     </span><span class="hs-comment">-- want incomplete pattern-match warnings</span><span>
</span><span id="line-707"></span><span>
</span><span id="line-708"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; DsM CoreExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[(Name, Id, CoreExpr)] -&gt; CoreExpr -&gt; CoreExpr
forall {a}. [(a, Id, CoreExpr)] -&gt; CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621681141228"><span class="hs-identifier hs-var">add_field_binds</span></a></span><span> </span><span class="annot"><span class="annottext">[(Name, Id, CoreExpr)]
</span><a href="#local-6989586621681141247"><span class="hs-identifier hs-var">field_binds'</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; CoreExpr) -&gt; CoreExpr -&gt; CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-709"></span><span>                  </span><span class="annot"><span class="annottext">Id -&gt; CoreExpr -&gt; CoreExpr -&gt; CoreExpr
</span><a href="GHC.Core.Utils.html#bindNonRec"><span class="hs-identifier hs-var">bindNonRec</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141239"><span class="hs-identifier hs-var">discrim_var</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141248"><span class="hs-identifier hs-var">record_expr'</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141238"><span class="hs-identifier hs-var">matching_code</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-710"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-711"></span><span>    </span><span class="annot"><a href="#local-6989586621681141246"><span class="hs-identifier hs-type">ds_field</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#LHsRecUpdField"><span class="hs-identifier hs-type">LHsRecUpdField</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#DsM"><span class="hs-identifier hs-type">DsM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-712"></span><span>      </span><span class="hs-comment">-- Clone the Id in the HsRecField, because its Name is that</span><span>
</span><span id="line-713"></span><span>      </span><span class="hs-comment">-- of the record selector, and we must not make that a local binder</span><span>
</span><span id="line-714"></span><span>      </span><span class="hs-comment">-- else we shadow other uses of the record selector</span><span>
</span><span id="line-715"></span><span>      </span><span class="hs-comment">-- Hence 'lcl_id'.  Cf #2735</span><span>
</span><span id="line-716"></span><span>    </span><span id="local-6989586621681141246"><span class="annot"><span class="annottext">ds_field :: LHsRecUpdField GhcTc
-&gt; IOEnv (Env DsGblEnv DsLclEnv) (Name, Id, CoreExpr)
</span><a href="#local-6989586621681141246"><span class="hs-identifier hs-var hs-var">ds_field</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141227"><span class="annot"><span class="annottext">HsRecUpdField GhcTc
</span><a href="#local-6989586621681141227"><span class="hs-identifier hs-var">rec_field</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-717"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681141226"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141226"><span class="hs-identifier hs-var">rhs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier hs-var">dsLExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsRecUpdField GhcTc -&gt; LHsExpr GhcTc
forall id arg. HsRecField' id arg -&gt; arg
</span><a href="GHC.Hs.Pat.html#hsRecFieldArg"><span class="hs-identifier hs-var hs-var">hsRecFieldArg</span></a></span><span> </span><span class="annot"><span class="annottext">HsRecUpdField GhcTc
</span><a href="#local-6989586621681141227"><span class="hs-identifier hs-var">rec_field</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-718"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681141224"><span class="annot"><span class="annottext">fld_id :: Id
</span><a href="#local-6989586621681141224"><span class="hs-identifier hs-var hs-var">fld_id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan Id -&gt; Id
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsRecUpdField GhcTc -&gt; GenLocated SrcSpan Id
forall arg.
HsRecField' (AmbiguousFieldOcc GhcTc) arg -&gt; GenLocated SrcSpan Id
</span><a href="GHC.Hs.Pat.html#hsRecUpdFieldId"><span class="hs-identifier hs-var">hsRecUpdFieldId</span></a></span><span> </span><span class="annot"><span class="annottext">HsRecUpdField GhcTc
</span><a href="#local-6989586621681141227"><span class="hs-identifier hs-var">rec_field</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-719"></span><span>           </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681141222"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141222"><span class="hs-identifier hs-var">lcl_id</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Type -&gt; Type -&gt; DsM Id
</span><a href="GHC.HsToCore.Monad.html#newSysLocalDs"><span class="hs-identifier hs-var">newSysLocalDs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Type
</span><a href="GHC.Types.Id.html#idMult"><span class="hs-identifier hs-var">idMult</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141224"><span class="hs-identifier hs-var">fld_id</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Type
</span><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-var">idType</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141224"><span class="hs-identifier hs-var">fld_id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-720"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(Name, Id, CoreExpr)
-&gt; IOEnv (Env DsGblEnv DsLclEnv) (Name, Id, CoreExpr)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Name
</span><a href="GHC.Types.Id.html#idName"><span class="hs-identifier hs-var">idName</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141224"><span class="hs-identifier hs-var">fld_id</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141222"><span class="hs-identifier hs-var">lcl_id</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141226"><span class="hs-identifier hs-var">rhs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-721"></span><span>
</span><span id="line-722"></span><span>    </span><span id="local-6989586621681141228"><span class="annot"><span class="annottext">add_field_binds :: [(a, Id, CoreExpr)] -&gt; CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621681141228"><span class="hs-identifier hs-var hs-var">add_field_binds</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span id="local-6989586621681141219"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141219"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141219"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-723"></span><span>    </span><span class="annot"><a href="#local-6989586621681141228"><span class="hs-identifier hs-var">add_field_binds</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span id="local-6989586621681141218"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141218"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681141217"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141217"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">)</span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621681141216"><span class="annot"><span class="annottext">[(a, Id, CoreExpr)]
</span><a href="#local-6989586621681141216"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681141215"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141215"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; CoreExpr -&gt; CoreExpr -&gt; CoreExpr
</span><a href="GHC.Core.Utils.html#bindNonRec"><span class="hs-identifier hs-var">bindNonRec</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141218"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141217"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[(a, Id, CoreExpr)] -&gt; CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621681141228"><span class="hs-identifier hs-var">add_field_binds</span></a></span><span> </span><span class="annot"><span class="annottext">[(a, Id, CoreExpr)]
</span><a href="#local-6989586621681141216"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141215"><span class="hs-identifier hs-var">expr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-724"></span><span>
</span><span id="line-725"></span><span>        </span><span class="hs-comment">-- Awkwardly, for families, the match goes</span><span>
</span><span id="line-726"></span><span>        </span><span class="hs-comment">-- from instance type to family type</span><span>
</span><span id="line-727"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621681141231"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681141231"><span class="hs-identifier hs-var">in_ty</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681141230"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681141230"><span class="hs-identifier hs-var">out_ty</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-728"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[ConLike] -&gt; ConLike
forall a. [a] -&gt; a
</span><a href="../../base/src/GHC.List.html#head"><span class="hs-identifier hs-var">head</span></a></span><span> </span><span class="annot"><span class="annottext">[ConLike]
</span><a href="#local-6989586621681141256"><span class="hs-identifier hs-var">cons_to_upd</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-729"></span><span>        </span><span class="annot"><a href="GHC.Core.ConLike.html#RealDataCon"><span class="hs-identifier hs-type">RealDataCon</span></a></span><span> </span><span id="local-6989586621681141212"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681141212"><span class="hs-identifier hs-var">data_con</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-730"></span><span>          </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681141211"><span class="annot"><span class="annottext">tycon :: TyCon
</span><a href="#local-6989586621681141211"><span class="hs-identifier hs-var hs-var">tycon</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; TyCon
</span><a href="GHC.Core.DataCon.html#dataConTyCon"><span class="hs-identifier hs-var">dataConTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681141212"><span class="hs-identifier hs-var">data_con</span></a></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-731"></span><span>          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyCon -&gt; [Type] -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#mkTyConApp"><span class="hs-identifier hs-var">mkTyConApp</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681141211"><span class="hs-identifier hs-var">tycon</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621681141254"><span class="hs-identifier hs-var">in_inst_tys</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; [Type] -&gt; Type
</span><a href="GHC.Core.Type.html#mkFamilyTyConApp"><span class="hs-identifier hs-var">mkFamilyTyConApp</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681141211"><span class="hs-identifier hs-var">tycon</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621681141252"><span class="hs-identifier hs-var">out_inst_tys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-732"></span><span>        </span><span class="annot"><a href="GHC.Core.ConLike.html#PatSynCon"><span class="hs-identifier hs-type">PatSynCon</span></a></span><span> </span><span id="local-6989586621681141206"><span class="annot"><span class="annottext">PatSyn
</span><a href="#local-6989586621681141206"><span class="hs-identifier hs-var">pat_syn</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-733"></span><span>          </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">PatSyn -&gt; [Type] -&gt; Type
</span><a href="GHC.Core.PatSyn.html#patSynInstResTy"><span class="hs-identifier hs-var">patSynInstResTy</span></a></span><span> </span><span class="annot"><span class="annottext">PatSyn
</span><a href="#local-6989586621681141206"><span class="hs-identifier hs-var">pat_syn</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621681141254"><span class="hs-identifier hs-var">in_inst_tys</span></a></span><span>
</span><span id="line-734"></span><span>          </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">PatSyn -&gt; [Type] -&gt; Type
</span><a href="GHC.Core.PatSyn.html#patSynInstResTy"><span class="hs-identifier hs-var">patSynInstResTy</span></a></span><span> </span><span class="annot"><span class="annottext">PatSyn
</span><a href="#local-6989586621681141206"><span class="hs-identifier hs-var">pat_syn</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621681141252"><span class="hs-identifier hs-var">out_inst_tys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-735"></span><span>    </span><span id="local-6989586621681141240"><span class="annot"><span class="annottext">mk_alt :: NameEnv Id
-&gt; ConLike
-&gt; IOEnv (Env DsGblEnv DsLclEnv) (LMatch GhcTc (LHsExpr GhcTc))
</span><a href="#local-6989586621681141240"><span class="hs-identifier hs-var hs-var">mk_alt</span></a></span></span><span> </span><span id="local-6989586621681141204"><span class="annot"><span class="annottext">NameEnv Id
</span><a href="#local-6989586621681141204"><span class="hs-identifier hs-var">upd_fld_env</span></a></span></span><span> </span><span id="local-6989586621681141203"><span class="annot"><span class="annottext">ConLike
</span><a href="#local-6989586621681141203"><span class="hs-identifier hs-var">con</span></a></span></span><span>
</span><span id="line-736"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681141202"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681141202"><span class="hs-identifier hs-var">univ_tvs</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681141201"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681141201"><span class="hs-identifier hs-var">ex_tvs</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681141200"><span class="annot"><span class="annottext">[EqSpec]
</span><a href="#local-6989586621681141200"><span class="hs-identifier hs-var">eq_spec</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-737"></span><span>                  </span><span id="local-6989586621681141199"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621681141199"><span class="hs-identifier hs-var">prov_theta</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681141198"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621681141198"><span class="hs-identifier hs-var">_req_theta</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681141197"><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621681141197"><span class="hs-identifier hs-var">arg_tys</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConLike
-&gt; ([Id], [Id], [EqSpec], [Type], [Type], [Scaled Type], Type)
</span><a href="GHC.Core.ConLike.html#conLikeFullSig"><span class="hs-identifier hs-var">conLikeFullSig</span></a></span><span> </span><span class="annot"><span class="annottext">ConLike
</span><a href="#local-6989586621681141203"><span class="hs-identifier hs-var">con</span></a></span><span>
</span><span id="line-738"></span><span>                 </span><span id="local-6989586621681141195"><span class="annot"><span class="annottext">arg_tys' :: [Scaled Type]
</span><a href="#local-6989586621681141195"><span class="hs-identifier hs-var hs-var">arg_tys'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Scaled Type -&gt; Scaled Type) -&gt; [Scaled Type] -&gt; [Scaled Type]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; Scaled Type -&gt; Scaled Type
forall a. Type -&gt; Scaled a -&gt; Scaled a
</span><a href="GHC.Core.Multiplicity.html#scaleScaled"><span class="hs-identifier hs-var">scaleScaled</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Core.Type.html#Many"><span class="hs-identifier hs-var">Many</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621681141197"><span class="hs-identifier hs-var">arg_tys</span></a></span><span>
</span><span id="line-739"></span><span>                   </span><span class="hs-comment">-- Record updates consume the source record with multiplicity</span><span>
</span><span id="line-740"></span><span>                   </span><span class="hs-comment">-- Many. Therefore all the fields need to be scaled thus.</span><span>
</span><span id="line-741"></span><span>                 </span><span id="local-6989586621681141193"><span class="annot"><span class="annottext">user_tvs :: [Id]
</span><a href="#local-6989586621681141193"><span class="hs-identifier hs-var hs-var">user_tvs</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[VarBndr Id Specificity] -&gt; [Id]
forall tv argf. [VarBndr tv argf] -&gt; [tv]
</span><a href="GHC.Types.Var.html#binderVars"><span class="hs-identifier hs-var">binderVars</span></a></span><span> </span><span class="annot"><span class="annottext">([VarBndr Id Specificity] -&gt; [Id])
-&gt; [VarBndr Id Specificity] -&gt; [Id]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ConLike -&gt; [VarBndr Id Specificity]
</span><a href="GHC.Core.ConLike.html#conLikeUserTyVarBinders"><span class="hs-identifier hs-var">conLikeUserTyVarBinders</span></a></span><span> </span><span class="annot"><span class="annottext">ConLike
</span><a href="#local-6989586621681141203"><span class="hs-identifier hs-var">con</span></a></span><span>
</span><span id="line-742"></span><span>                 </span><span id="local-6989586621681141190"><span class="annot"><span class="annottext">in_subst :: TCvSubst
</span><a href="#local-6989586621681141190"><span class="hs-identifier hs-var hs-var">in_subst</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Id] -&gt; [Type] -&gt; TCvSubst
HasDebugCallStack =&gt; [Id] -&gt; [Type] -&gt; TCvSubst
</span><a href="GHC.Core.TyCo.Subst.html#zipTvSubst"><span class="hs-identifier hs-var">zipTvSubst</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681141202"><span class="hs-identifier hs-var">univ_tvs</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621681141254"><span class="hs-identifier hs-var">in_inst_tys</span></a></span><span>
</span><span id="line-743"></span><span>                 </span><span id="local-6989586621681141188"><span class="annot"><span class="annottext">out_subst :: TCvSubst
</span><a href="#local-6989586621681141188"><span class="hs-identifier hs-var hs-var">out_subst</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Id] -&gt; [Type] -&gt; TCvSubst
HasDebugCallStack =&gt; [Id] -&gt; [Type] -&gt; TCvSubst
</span><a href="GHC.Core.TyCo.Subst.html#zipTvSubst"><span class="hs-identifier hs-var">zipTvSubst</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681141202"><span class="hs-identifier hs-var">univ_tvs</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621681141252"><span class="hs-identifier hs-var">out_inst_tys</span></a></span><span>
</span><span id="line-744"></span><span>
</span><span id="line-745"></span><span>                </span><span class="hs-comment">-- I'm not bothering to clone the ex_tvs</span><span>
</span><span id="line-746"></span><span>           </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681141187"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681141187"><span class="hs-identifier hs-var">eqs_vars</span></a></span></span><span>   </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(Type -&gt; DsM Id) -&gt; [Type] -&gt; DsM [Id]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; DsM Id
</span><a href="GHC.HsToCore.Monad.html#newPredVarDs"><span class="hs-identifier hs-var">newPredVarDs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HasCallStack =&gt; TCvSubst -&gt; [Type] -&gt; [Type]
TCvSubst -&gt; [Type] -&gt; [Type]
</span><a href="GHC.Core.TyCo.Subst.html#substTheta"><span class="hs-identifier hs-var">substTheta</span></a></span><span> </span><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621681141190"><span class="hs-identifier hs-var">in_subst</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[EqSpec] -&gt; [Type]
</span><a href="GHC.Core.DataCon.html#eqSpecPreds"><span class="hs-identifier hs-var">eqSpecPreds</span></a></span><span> </span><span class="annot"><span class="annottext">[EqSpec]
</span><a href="#local-6989586621681141200"><span class="hs-identifier hs-var">eq_spec</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-747"></span><span>           </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681141183"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681141183"><span class="hs-identifier hs-var">theta_vars</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(Type -&gt; DsM Id) -&gt; [Type] -&gt; DsM [Id]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; DsM Id
</span><a href="GHC.HsToCore.Monad.html#newPredVarDs"><span class="hs-identifier hs-var">newPredVarDs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HasCallStack =&gt; TCvSubst -&gt; [Type] -&gt; [Type]
TCvSubst -&gt; [Type] -&gt; [Type]
</span><a href="GHC.Core.TyCo.Subst.html#substTheta"><span class="hs-identifier hs-var">substTheta</span></a></span><span> </span><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621681141190"><span class="hs-identifier hs-var">in_subst</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621681141199"><span class="hs-identifier hs-var">prov_theta</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-748"></span><span>           </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681141182"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681141182"><span class="hs-identifier hs-var">arg_ids</span></a></span></span><span>    </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Scaled Type] -&gt; DsM [Id]
</span><a href="GHC.HsToCore.Monad.html#newSysLocalsDs"><span class="hs-identifier hs-var">newSysLocalsDs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TCvSubst -&gt; [Scaled Type] -&gt; [Scaled Type]
</span><a href="GHC.Core.TyCo.Subst.html#substScaledTysUnchecked"><span class="hs-identifier hs-var">substScaledTysUnchecked</span></a></span><span> </span><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621681141190"><span class="hs-identifier hs-var">in_subst</span></a></span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621681141195"><span class="hs-identifier hs-var">arg_tys'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-749"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681141179"><span class="annot"><span class="annottext">field_labels :: [FieldLbl Name]
</span><a href="#local-6989586621681141179"><span class="hs-identifier hs-var hs-var">field_labels</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConLike -&gt; [FieldLbl Name]
</span><a href="GHC.Core.ConLike.html#conLikeFieldLabels"><span class="hs-identifier hs-var">conLikeFieldLabels</span></a></span><span> </span><span class="annot"><span class="annottext">ConLike
</span><a href="#local-6989586621681141203"><span class="hs-identifier hs-var">con</span></a></span><span>
</span><span id="line-750"></span><span>                 </span><span id="local-6989586621681141178"><span class="annot"><span class="annottext">val_args :: [LHsExpr GhcTc]
</span><a href="#local-6989586621681141178"><span class="hs-identifier hs-var hs-var">val_args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
-&gt; (FieldLbl Name -&gt; Id -&gt; LHsExpr GhcTc)
-&gt; [FieldLbl Name]
-&gt; [Id]
-&gt; [LHsExpr GhcTc]
forall a b c. String -&gt; (a -&gt; b -&gt; c) -&gt; [a] -&gt; [b] -&gt; [c]
</span><a href="GHC.Utils.Misc.html#zipWithEqual"><span class="hs-identifier hs-var">zipWithEqual</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dsExpr:RecordUpd&quot;</span></span><span> </span><span class="annot"><span class="annottext">FieldLbl Name -&gt; Id -&gt; LHsExpr GhcTc
</span><a href="#local-6989586621681141176"><span class="hs-identifier hs-var">mk_val_arg</span></a></span><span>
</span><span id="line-751"></span><span>                                         </span><span class="annot"><span class="annottext">[FieldLbl Name]
</span><a href="#local-6989586621681141179"><span class="hs-identifier hs-var">field_labels</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681141182"><span class="hs-identifier hs-var">arg_ids</span></a></span><span>
</span><span id="line-752"></span><span>                 </span><span id="local-6989586621681141176"><span class="annot"><span class="annottext">mk_val_arg :: FieldLbl Name -&gt; Id -&gt; LHsExpr GhcTc
</span><a href="#local-6989586621681141176"><span class="hs-identifier hs-var hs-var">mk_val_arg</span></a></span></span><span> </span><span id="local-6989586621681141175"><span class="annot"><span class="annottext">FieldLbl Name
</span><a href="#local-6989586621681141175"><span class="hs-identifier hs-var">fl</span></a></span></span><span> </span><span id="local-6989586621681141174"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141174"><span class="hs-identifier hs-var">pat_arg_id</span></a></span></span><span>
</span><span id="line-753"></span><span>                     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdP GhcTc -&gt; LHsExpr GhcTc
forall (id :: Pass). IdP (GhcPass id) -&gt; LHsExpr (GhcPass id)
</span><a href="GHC.Hs.Utils.html#nlHsVar"><span class="hs-identifier hs-var">nlHsVar</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NameEnv Id -&gt; Name -&gt; Maybe Id
forall a. NameEnv a -&gt; Name -&gt; Maybe a
</span><a href="GHC.Types.Name.Env.html#lookupNameEnv"><span class="hs-identifier hs-var">lookupNameEnv</span></a></span><span> </span><span class="annot"><span class="annottext">NameEnv Id
</span><a href="#local-6989586621681141204"><span class="hs-identifier hs-var">upd_fld_env</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldLbl Name -&gt; Name
forall a. FieldLbl a -&gt; a
</span><a href="GHC.Types.FieldLabel.html#flSelector"><span class="hs-identifier hs-var hs-var">flSelector</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLbl Name
</span><a href="#local-6989586621681141175"><span class="hs-identifier hs-var">fl</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe Id -&gt; Id -&gt; Id
forall a. Maybe a -&gt; a -&gt; a
</span><a href="GHC.Data.Maybe.html#orElse"><span class="hs-operator hs-var">`orElse`</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141174"><span class="hs-identifier hs-var">pat_arg_id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-754"></span><span>
</span><span id="line-755"></span><span>                 </span><span id="local-6989586621681141170"><span class="annot"><span class="annottext">inst_con :: LHsExpr GhcTc
</span><a href="#local-6989586621681141170"><span class="hs-identifier hs-var hs-var">inst_con</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc -&gt; LHsExpr GhcTc
forall e. e -&gt; Located e
</span><a href="GHC.Types.SrcLoc.html#noLoc"><span class="hs-identifier hs-var">noLoc</span></a></span><span> </span><span class="annot"><span class="annottext">(HsExpr GhcTc -&gt; LHsExpr GhcTc) -&gt; HsExpr GhcTc -&gt; LHsExpr GhcTc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HsWrapper -&gt; HsExpr GhcTc -&gt; HsExpr GhcTc
</span><a href="GHC.Hs.Utils.html#mkHsWrap"><span class="hs-identifier hs-var">mkHsWrap</span></a></span><span> </span><span class="annot"><span class="annottext">HsWrapper
</span><a href="#local-6989586621681141168"><span class="hs-identifier hs-var">wrap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XConLikeOut GhcTc -&gt; ConLike -&gt; HsExpr GhcTc
forall p. XConLikeOut p -&gt; ConLike -&gt; HsExpr p
</span><a href="GHC.Hs.Expr.html#HsConLikeOut"><span class="hs-identifier hs-var">HsConLikeOut</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XConLikeOut GhcTc
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="annot"><span class="annottext">ConLike
</span><a href="#local-6989586621681141203"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-756"></span><span>                        </span><span class="hs-comment">-- Reconstruct with the WrapId so that unpacking happens</span><span>
</span><span id="line-757"></span><span>                 </span><span id="local-6989586621681141168"><span class="annot"><span class="annottext">wrap :: HsWrapper
</span><a href="#local-6989586621681141168"><span class="hs-identifier hs-var hs-var">wrap</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Id] -&gt; HsWrapper
</span><a href="GHC.Tc.Types.Evidence.html#mkWpEvVarApps"><span class="hs-identifier hs-var">mkWpEvVarApps</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681141183"><span class="hs-identifier hs-var">theta_vars</span></a></span><span>                                </span><span class="annot"><span class="annottext">HsWrapper -&gt; HsWrapper -&gt; HsWrapper
</span><a href="GHC.Tc.Types.Evidence.html#%3C.%3E"><span class="hs-operator hs-var">&lt;.&gt;</span></a></span><span>
</span><span id="line-758"></span><span>                        </span><span class="annot"><span class="annottext">HsWrapper
</span><a href="#local-6989586621681141250"><span class="hs-identifier hs-var">dict_req_wrap</span></a></span><span>                                           </span><span class="annot"><span class="annottext">HsWrapper -&gt; HsWrapper -&gt; HsWrapper
</span><a href="GHC.Tc.Types.Evidence.html#%3C.%3E"><span class="hs-operator hs-var">&lt;.&gt;</span></a></span><span>
</span><span id="line-759"></span><span>                        </span><span class="annot"><span class="annottext">[Type] -&gt; HsWrapper
</span><a href="GHC.Tc.Types.Evidence.html#mkWpTyApps"><span class="hs-identifier hs-var">mkWpTyApps</span></a></span><span>    </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">TCvSubst -&gt; Id -&gt; Maybe Type
</span><a href="GHC.Core.TyCo.Subst.html#lookupTyVar"><span class="hs-identifier hs-var">lookupTyVar</span></a></span><span> </span><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621681141188"><span class="hs-identifier hs-var">out_subst</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141163"><span class="hs-identifier hs-var">tv</span></a></span><span>
</span><span id="line-760"></span><span>                                          </span><span class="annot"><span class="annottext">Maybe Type -&gt; Type -&gt; Type
forall a. Maybe a -&gt; a -&gt; a
</span><a href="GHC.Data.Maybe.html#orElse"><span class="hs-operator hs-var">`orElse`</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#mkTyVarTy"><span class="hs-identifier hs-var">mkTyVarTy</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141163"><span class="hs-identifier hs-var">tv</span></a></span><span>
</span><span id="line-761"></span><span>                                      </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621681141163"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141163"><span class="hs-identifier hs-var">tv</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681141193"><span class="hs-identifier hs-var">user_tvs</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-762"></span><span>                          </span><span class="hs-comment">-- Be sure to use user_tvs (which may be ordered</span><span>
</span><span id="line-763"></span><span>                          </span><span class="hs-comment">-- differently than `univ_tvs ++ ex_tvs) above.</span><span>
</span><span id="line-764"></span><span>                          </span><span class="hs-comment">-- See Note [DataCon user type variable binders]</span><span>
</span><span id="line-765"></span><span>                          </span><span class="hs-comment">-- in GHC.Core.DataCon.</span><span>
</span><span id="line-766"></span><span>                 </span><span id="local-6989586621681141161"><span class="annot"><span class="annottext">rhs :: LHsExpr GhcTc
</span><a href="#local-6989586621681141161"><span class="hs-identifier hs-var hs-var">rhs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(LHsExpr GhcTc -&gt; LHsExpr GhcTc -&gt; LHsExpr GhcTc)
-&gt; LHsExpr GhcTc -&gt; [LHsExpr GhcTc] -&gt; LHsExpr GhcTc
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl%27"><span class="hs-identifier hs-var">foldl'</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681141159"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141159"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621681141158"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141158"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; LHsExpr GhcTc -&gt; LHsExpr GhcTc
forall (id :: Pass).
IsPass id =&gt;
LHsExpr (GhcPass id)
-&gt; LHsExpr (GhcPass id) -&gt; LHsExpr (GhcPass id)
</span><a href="GHC.Hs.Utils.html#nlHsApp"><span class="hs-identifier hs-var">nlHsApp</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141159"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141158"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141170"><span class="hs-identifier hs-var">inst_con</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsExpr GhcTc]
</span><a href="#local-6989586621681141178"><span class="hs-identifier hs-var">val_args</span></a></span><span>
</span><span id="line-767"></span><span>
</span><span id="line-768"></span><span>                        </span><span class="hs-comment">-- Tediously wrap the application in a cast</span><span>
</span><span id="line-769"></span><span>                        </span><span class="hs-comment">-- Note [Update for GADTs]</span><span>
</span><span id="line-770"></span><span>                 </span><span id="local-6989586621681141156"><span class="annot"><span class="annottext">wrapped_rhs :: LHsExpr GhcTc
</span><a href="#local-6989586621681141156"><span class="hs-identifier hs-var hs-var">wrapped_rhs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-771"></span><span>                  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ConLike
</span><a href="#local-6989586621681141203"><span class="hs-identifier hs-var">con</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-772"></span><span>                    </span><span class="annot"><a href="GHC.Core.ConLike.html#RealDataCon"><span class="hs-identifier hs-type">RealDataCon</span></a></span><span> </span><span id="local-6989586621681141155"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681141155"><span class="hs-identifier hs-var">data_con</span></a></span></span><span>
</span><span id="line-773"></span><span>                      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">[EqSpec] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[EqSpec]
</span><a href="#local-6989586621681141200"><span class="hs-identifier hs-var">eq_spec</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141161"><span class="hs-identifier hs-var">rhs</span></a></span><span>
</span><span id="line-774"></span><span>                      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HsWrapper -&gt; LHsExpr GhcTc -&gt; LHsExpr GhcTc
</span><a href="GHC.Hs.Utils.html#mkLHsWrap"><span class="hs-identifier hs-var">mkLHsWrap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TcCoercionN -&gt; HsWrapper
</span><a href="GHC.Tc.Types.Evidence.html#mkWpCastN"><span class="hs-identifier hs-var">mkWpCastN</span></a></span><span> </span><span class="annot"><span class="annottext">TcCoercionN
</span><a href="#local-6989586621681141152"><span class="hs-identifier hs-var">wrap_co</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141161"><span class="hs-identifier hs-var">rhs</span></a></span><span>
</span><span id="line-775"></span><span>                                     </span><span class="hs-comment">-- This wrap is the punchline: Note [Update for GADTs]</span><span>
</span><span id="line-776"></span><span>                      </span><span class="hs-keyword">where</span><span>
</span><span id="line-777"></span><span>                        </span><span id="local-6989586621681141151"><span class="annot"><span class="annottext">rep_tc :: TyCon
</span><a href="#local-6989586621681141151"><span class="hs-identifier hs-var hs-var">rep_tc</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; TyCon
</span><a href="GHC.Core.DataCon.html#dataConTyCon"><span class="hs-identifier hs-var">dataConTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681141155"><span class="hs-identifier hs-var">data_con</span></a></span><span>
</span><span id="line-778"></span><span>                        </span><span id="local-6989586621681141152"><span class="annot"><span class="annottext">wrap_co :: TcCoercionN
</span><a href="#local-6989586621681141152"><span class="hs-identifier hs-var hs-var">wrap_co</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; [TcCoercionN] -&gt; TcCoercionN
</span><a href="GHC.Tc.Types.Evidence.html#mkTcFamilyTyConAppCo"><span class="hs-identifier hs-var">mkTcFamilyTyConAppCo</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681141151"><span class="hs-identifier hs-var">rep_tc</span></a></span><span> </span><span class="annot"><span class="annottext">[TcCoercionN]
</span><a href="#local-6989586621681141149"><span class="hs-identifier hs-var">univ_cos</span></a></span><span>
</span><span id="line-779"></span><span>                        </span><span id="local-6989586621681141149"><span class="annot"><span class="annottext">univ_cos :: [TcCoercionN]
</span><a href="#local-6989586621681141149"><span class="hs-identifier hs-var hs-var">univ_cos</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
-&gt; (Id -&gt; Type -&gt; TcCoercionN) -&gt; [Id] -&gt; [Type] -&gt; [TcCoercionN]
forall a b c. String -&gt; (a -&gt; b -&gt; c) -&gt; [a] -&gt; [b] -&gt; [c]
</span><a href="GHC.Utils.Misc.html#zipWithEqual"><span class="hs-identifier hs-var">zipWithEqual</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dsExpr:upd&quot;</span></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Type -&gt; TcCoercionN
</span><a href="#local-6989586621681141148"><span class="hs-identifier hs-var">mk_univ_co</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681141202"><span class="hs-identifier hs-var">univ_tvs</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621681141252"><span class="hs-identifier hs-var">out_inst_tys</span></a></span><span>
</span><span id="line-780"></span><span>
</span><span id="line-781"></span><span>                        </span><span class="annot"><a href="#local-6989586621681141148"><span class="hs-identifier hs-type">mk_univ_co</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#TyVar"><span class="hs-identifier hs-type">TyVar</span></a></span><span>   </span><span class="hs-comment">-- Universal tyvar from the DataCon</span><span>
</span><span id="line-782"></span><span>                                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span>    </span><span class="hs-comment">-- Corresponding instantiating type</span><span>
</span><span id="line-783"></span><span>                                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Coercion"><span class="hs-identifier hs-type">Coercion</span></a></span><span>
</span><span id="line-784"></span><span>                        </span><span id="local-6989586621681141148"><span class="annot"><span class="annottext">mk_univ_co :: Id -&gt; Type -&gt; TcCoercionN
</span><a href="#local-6989586621681141148"><span class="hs-identifier hs-var hs-var">mk_univ_co</span></a></span></span><span> </span><span id="local-6989586621681141146"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141146"><span class="hs-identifier hs-var">univ_tv</span></a></span></span><span> </span><span id="local-6989586621681141145"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681141145"><span class="hs-identifier hs-var">inst_ty</span></a></span></span><span>
</span><span id="line-785"></span><span>                          </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">VarEnv TcCoercionN -&gt; Id -&gt; Maybe TcCoercionN
forall a. VarEnv a -&gt; Id -&gt; Maybe a
</span><a href="GHC.Types.Var.Env.html#lookupVarEnv"><span class="hs-identifier hs-var">lookupVarEnv</span></a></span><span> </span><span class="annot"><span class="annottext">VarEnv TcCoercionN
</span><a href="#local-6989586621681141143"><span class="hs-identifier hs-var">eq_spec_env</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141146"><span class="hs-identifier hs-var">univ_tv</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-786"></span><span>                               </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681141142"><span class="annot"><span class="annottext">TcCoercionN
</span><a href="#local-6989586621681141142"><span class="hs-identifier hs-var">co</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">TcCoercionN
</span><a href="#local-6989586621681141142"><span class="hs-identifier hs-var">co</span></a></span><span>
</span><span id="line-787"></span><span>                               </span><span class="annot"><span class="annottext">Maybe TcCoercionN
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Type -&gt; TcCoercionN
</span><a href="GHC.Tc.Types.Evidence.html#mkTcNomReflCo"><span class="hs-identifier hs-var">mkTcNomReflCo</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681141145"><span class="hs-identifier hs-var">inst_ty</span></a></span><span>
</span><span id="line-788"></span><span>
</span><span id="line-789"></span><span>                        </span><span class="annot"><a href="#local-6989586621681141143"><span class="hs-identifier hs-type">eq_spec_env</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Coercion"><span class="hs-identifier hs-type">Coercion</span></a></span><span>
</span><span id="line-790"></span><span>                        </span><span id="local-6989586621681141143"><span class="annot"><span class="annottext">eq_spec_env :: VarEnv TcCoercionN
</span><a href="#local-6989586621681141143"><span class="hs-identifier hs-var hs-var">eq_spec_env</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(Id, TcCoercionN)] -&gt; VarEnv TcCoercionN
forall a. [(Id, a)] -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#mkVarEnv"><span class="hs-identifier hs-var">mkVarEnv</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">EqSpec -&gt; Id
</span><a href="GHC.Core.DataCon.html#eqSpecTyVar"><span class="hs-identifier hs-var">eqSpecTyVar</span></a></span><span> </span><span class="annot"><span class="annottext">EqSpec
</span><a href="#local-6989586621681141138"><span class="hs-identifier hs-var">spec</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">TcCoercionN -&gt; TcCoercionN
</span><a href="GHC.Tc.Types.Evidence.html#mkTcSymCo"><span class="hs-identifier hs-var">mkTcSymCo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; TcCoercionN
</span><a href="GHC.Tc.Types.Evidence.html#mkTcCoVarCo"><span class="hs-identifier hs-var">mkTcCoVarCo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141135"><span class="hs-identifier hs-var">eqs_var</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-791"></span><span>                                               </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681141138"><span class="annot"><span class="annottext">EqSpec
</span><a href="#local-6989586621681141138"><span class="hs-identifier hs-var">spec</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681141135"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141135"><span class="hs-identifier hs-var">eqs_var</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; [EqSpec] -&gt; [Id] -&gt; [(EqSpec, Id)]
forall a b. String -&gt; [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="GHC.Utils.Misc.html#zipEqual"><span class="hs-identifier hs-var">zipEqual</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dsExpr:upd2&quot;</span></span><span> </span><span class="annot"><span class="annottext">[EqSpec]
</span><a href="#local-6989586621681141200"><span class="hs-identifier hs-var">eq_spec</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681141187"><span class="hs-identifier hs-var">eqs_vars</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-792"></span><span>
</span><span id="line-793"></span><span>                    </span><span class="hs-comment">-- eq_spec is always null for a PatSynCon</span><span>
</span><span id="line-794"></span><span>                    </span><span class="annot"><a href="GHC.Core.ConLike.html#PatSynCon"><span class="hs-identifier hs-type">PatSynCon</span></a></span><span> </span><span class="annot"><span class="annottext">PatSyn
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141161"><span class="hs-identifier hs-var">rhs</span></a></span><span>
</span><span id="line-795"></span><span>
</span><span id="line-796"></span><span>
</span><span id="line-797"></span><span>                 </span><span id="local-6989586621681141134"><span class="annot"><span class="annottext">req_wrap :: HsWrapper
</span><a href="#local-6989586621681141134"><span class="hs-identifier hs-var hs-var">req_wrap</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsWrapper
</span><a href="#local-6989586621681141250"><span class="hs-identifier hs-var">dict_req_wrap</span></a></span><span> </span><span class="annot"><span class="annottext">HsWrapper -&gt; HsWrapper -&gt; HsWrapper
</span><a href="GHC.Tc.Types.Evidence.html#%3C.%3E"><span class="hs-operator hs-var">&lt;.&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[Type] -&gt; HsWrapper
</span><a href="GHC.Tc.Types.Evidence.html#mkWpTyApps"><span class="hs-identifier hs-var">mkWpTyApps</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621681141254"><span class="hs-identifier hs-var">in_inst_tys</span></a></span><span>
</span><span id="line-798"></span><span>
</span><span id="line-799"></span><span>                 </span><span id="local-6989586621681141133"><span class="annot"><span class="annottext">pat :: Located (Pat GhcTc)
</span><a href="#local-6989586621681141133"><span class="hs-identifier hs-var hs-var">pat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Pat GhcTc -&gt; Located (Pat GhcTc)
forall e. e -&gt; Located e
</span><a href="GHC.Types.SrcLoc.html#noLoc"><span class="hs-identifier hs-var">noLoc</span></a></span><span> </span><span class="annot"><span class="annottext">(Pat GhcTc -&gt; Located (Pat GhcTc))
-&gt; Pat GhcTc -&gt; Located (Pat GhcTc)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ConPat :: forall p.
XConPat p -&gt; Located (ConLikeP p) -&gt; HsConPatDetails p -&gt; Pat p
</span><a href="GHC.Hs.Pat.html#ConPat"><span class="hs-identifier hs-type">ConPat</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">pat_con :: Located (ConLikeP GhcTc)
</span><a href="GHC.Hs.Pat.html#pat_con"><span class="hs-identifier hs-var">pat_con</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConLike -&gt; Located ConLike
forall e. e -&gt; Located e
</span><a href="GHC.Types.SrcLoc.html#noLoc"><span class="hs-identifier hs-var">noLoc</span></a></span><span> </span><span class="annot"><span class="annottext">ConLike
</span><a href="#local-6989586621681141203"><span class="hs-identifier hs-var">con</span></a></span><span>
</span><span id="line-800"></span><span>                                      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">pat_args :: HsConPatDetails GhcTc
</span><a href="GHC.Hs.Pat.html#pat_args"><span class="hs-identifier hs-var">pat_args</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Located (Pat GhcTc)]
-&gt; HsConDetails
     (Located (Pat GhcTc)) (HsRecFields GhcTc (Located (Pat GhcTc)))
forall arg rec. [arg] -&gt; HsConDetails arg rec
</span><a href="GHC.Hs.Type.html#PrefixCon"><span class="hs-identifier hs-var">PrefixCon</span></a></span><span> </span><span class="annot"><span class="annottext">([Located (Pat GhcTc)]
 -&gt; HsConDetails
      (Located (Pat GhcTc)) (HsRecFields GhcTc (Located (Pat GhcTc))))
-&gt; [Located (Pat GhcTc)]
-&gt; HsConDetails
     (Located (Pat GhcTc)) (HsRecFields GhcTc (Located (Pat GhcTc)))
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Id -&gt; Located (Pat GhcTc)) -&gt; [Id] -&gt; [Located (Pat GhcTc)]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Located (Pat GhcTc)
forall (id :: Pass). IdP (GhcPass id) -&gt; LPat (GhcPass id)
</span><a href="GHC.Hs.Utils.html#nlVarPat"><span class="hs-identifier hs-var">nlVarPat</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681141182"><span class="hs-identifier hs-var">arg_ids</span></a></span><span>
</span><span id="line-801"></span><span>                                      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">pat_con_ext :: XConPat GhcTc
</span><a href="GHC.Hs.Pat.html#pat_con_ext"><span class="hs-identifier hs-var">pat_con_ext</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConPatTc :: [Type] -&gt; [Id] -&gt; [Id] -&gt; TcEvBinds -&gt; HsWrapper -&gt; ConPatTc
</span><a href="GHC.Hs.Pat.html#ConPatTc"><span class="hs-identifier hs-type">ConPatTc</span></a></span><span>
</span><span id="line-802"></span><span>                                        </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cpt_tvs :: [Id]
</span><a href="GHC.Hs.Pat.html#cpt_tvs"><span class="hs-identifier hs-var">cpt_tvs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681141201"><span class="hs-identifier hs-var">ex_tvs</span></a></span><span>
</span><span id="line-803"></span><span>                                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cpt_dicts :: [Id]
</span><a href="GHC.Hs.Pat.html#cpt_dicts"><span class="hs-identifier hs-var">cpt_dicts</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681141187"><span class="hs-identifier hs-var">eqs_vars</span></a></span><span> </span><span class="annot"><span class="annottext">[Id] -&gt; [Id] -&gt; [Id]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681141183"><span class="hs-identifier hs-var">theta_vars</span></a></span><span>
</span><span id="line-804"></span><span>                                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cpt_binds :: TcEvBinds
</span><a href="GHC.Hs.Pat.html#cpt_binds"><span class="hs-identifier hs-var">cpt_binds</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TcEvBinds
</span><a href="GHC.Tc.Types.Evidence.html#emptyTcEvBinds"><span class="hs-identifier hs-var">emptyTcEvBinds</span></a></span><span>
</span><span id="line-805"></span><span>                                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cpt_arg_tys :: [Type]
</span><a href="GHC.Hs.Pat.html#cpt_arg_tys"><span class="hs-identifier hs-var">cpt_arg_tys</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621681141254"><span class="hs-identifier hs-var">in_inst_tys</span></a></span><span>
</span><span id="line-806"></span><span>                                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cpt_wrap :: HsWrapper
</span><a href="GHC.Hs.Pat.html#cpt_wrap"><span class="hs-identifier hs-var">cpt_wrap</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsWrapper
</span><a href="#local-6989586621681141134"><span class="hs-identifier hs-var">req_wrap</span></a></span><span>
</span><span id="line-807"></span><span>                                        </span><span class="hs-special">}</span><span>
</span><span id="line-808"></span><span>                                      </span><span class="hs-special">}</span><span>
</span><span id="line-809"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">LMatch GhcTc (LHsExpr GhcTc)
-&gt; IOEnv (Env DsGblEnv DsLclEnv) (LMatch GhcTc (LHsExpr GhcTc))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsMatchContext (NoGhcTc GhcTc)
-&gt; [LPat GhcTc] -&gt; LHsExpr GhcTc -&gt; LMatch GhcTc (LHsExpr GhcTc)
forall (p :: Pass) (body :: * -&gt; *).
HsMatchContext (NoGhcTc (GhcPass p))
-&gt; [LPat (GhcPass p)]
-&gt; Located (body (GhcPass p))
-&gt; LMatch (GhcPass p) (Located (body (GhcPass p)))
</span><a href="GHC.Hs.Utils.html#mkSimpleMatch"><span class="hs-identifier hs-var">mkSimpleMatch</span></a></span><span> </span><span class="annot"><span class="annottext">HsMatchContext (NoGhcTc GhcTc)
forall p. HsMatchContext p
</span><a href="GHC.Hs.Expr.html#RecUpd"><span class="hs-identifier hs-var">RecUpd</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Located (Pat GhcTc)
LPat GhcTc
</span><a href="#local-6989586621681141133"><span class="hs-identifier hs-var">pat</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141156"><span class="hs-identifier hs-var">wrapped_rhs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-810"></span><span>
</span><span id="line-811"></span><span class="hs-comment">{- Note [Scrutinee in Record updates]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Consider #17783:

  data PartialRec = No
                  | Yes { a :: Int, b :: Bool }
  update No = No
  update r@(Yes {}) = r { b = False }

In the context of pattern-match checking, the occurrence of @r@ in
@r { b = False }@ is to be treated as if it was a scrutinee, as can be seen by
the following desugaring:

  r { b = False } ==&gt; case r of Yes a b -&gt; Yes a False

Thus, we pass @r@ as the scrutinee expression to @matchWrapper@ above.
-}</span><span>
</span><span id="line-828"></span><span>
</span><span id="line-829"></span><span class="hs-comment">-- Here is where we desugar the Template Haskell brackets and escapes</span><span>
</span><span id="line-830"></span><span>
</span><span id="line-831"></span><span class="hs-comment">-- Template Haskell stuff</span><span>
</span><span id="line-832"></span><span>
</span><span id="line-833"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsRnBracketOut"><span class="hs-identifier hs-type">HsRnBracketOut</span></a></span><span> </span><span class="annot"><span class="annottext">XRnBracketOut GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">HsBracket GhcRn
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[PendingRnSplice]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; DsM CoreExpr
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dsExpr HsRnBracketOut&quot;</span></span><span>
</span><span id="line-834"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsTcBracketOut"><span class="hs-identifier hs-type">HsTcBracketOut</span></a></span><span> </span><span class="annot"><span class="annottext">XTcBracketOut GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141116"><span class="annot"><span class="annottext">Maybe QuoteWrapper
</span><a href="#local-6989586621681141116"><span class="hs-identifier hs-var">hs_wrapper</span></a></span></span><span> </span><span id="local-6989586621681141115"><span class="annot"><span class="annottext">HsBracket GhcRn
</span><a href="#local-6989586621681141115"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621681141114"><span class="annot"><span class="annottext">[PendingTcSplice]
</span><a href="#local-6989586621681141114"><span class="hs-identifier hs-var">ps</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe QuoteWrapper
-&gt; HsBracket GhcRn -&gt; [PendingTcSplice] -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Quote.html#dsBracket"><span class="hs-identifier hs-var">dsBracket</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe QuoteWrapper
</span><a href="#local-6989586621681141116"><span class="hs-identifier hs-var">hs_wrapper</span></a></span><span> </span><span class="annot"><span class="annottext">HsBracket GhcRn
</span><a href="#local-6989586621681141115"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">[PendingTcSplice]
</span><a href="#local-6989586621681141114"><span class="hs-identifier hs-var">ps</span></a></span><span>
</span><span id="line-835"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsSpliceE"><span class="hs-identifier hs-type">HsSpliceE</span></a></span><span> </span><span class="annot"><span class="annottext">XSpliceE GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141111"><span class="annot"><span class="annottext">HsSplice GhcTc
</span><a href="#local-6989586621681141111"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; DsM CoreExpr
forall a. HasCallStack =&gt; String -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dsExpr:splice&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsSplice GhcTc -&gt; SDoc
forall {a}. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">HsSplice GhcTc
</span><a href="#local-6989586621681141111"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-836"></span><span>
</span><span id="line-837"></span><span class="hs-comment">-- Arrow notation extension</span><span>
</span><span id="line-838"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsProc"><span class="hs-identifier hs-type">HsProc</span></a></span><span> </span><span class="annot"><span class="annottext">XProc GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141109"><span class="annot"><span class="annottext">LPat GhcTc
</span><a href="#local-6989586621681141109"><span class="hs-identifier hs-var">pat</span></a></span></span><span> </span><span id="local-6989586621681141108"><span class="annot"><span class="annottext">LHsCmdTop GhcTc
</span><a href="#local-6989586621681141108"><span class="hs-identifier hs-var">cmd</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LPat GhcTc -&gt; LHsCmdTop GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Arrows.html#dsProcExpr"><span class="hs-identifier hs-var">dsProcExpr</span></a></span><span> </span><span class="annot"><span class="annottext">LPat GhcTc
</span><a href="#local-6989586621681141109"><span class="hs-identifier hs-var">pat</span></a></span><span> </span><span class="annot"><span class="annottext">LHsCmdTop GhcTc
</span><a href="#local-6989586621681141108"><span class="hs-identifier hs-var">cmd</span></a></span><span>
</span><span id="line-839"></span><span>
</span><span id="line-840"></span><span class="hs-comment">-- Hpc Support</span><span>
</span><span id="line-841"></span><span>
</span><span id="line-842"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsTick"><span class="hs-identifier hs-type">HsTick</span></a></span><span> </span><span class="annot"><span class="annottext">XTick GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141105"><span class="annot"><span class="annottext">Tickish (IdP GhcTc)
</span><a href="#local-6989586621681141105"><span class="hs-identifier hs-var">tickish</span></a></span></span><span> </span><span id="local-6989586621681141104"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141104"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-843"></span><span>  </span><span id="local-6989586621681141103"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141103"><span class="hs-identifier hs-var">e'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier hs-var">dsLExpr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141104"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-844"></span><span>  </span><span class="annot"><span class="annottext">CoreExpr -&gt; DsM CoreExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Tickish Id -&gt; CoreExpr -&gt; CoreExpr
forall b. Tickish Id -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#Tick"><span class="hs-identifier hs-var">Tick</span></a></span><span> </span><span class="annot"><span class="annottext">Tickish Id
Tickish (IdP GhcTc)
</span><a href="#local-6989586621681141105"><span class="hs-identifier hs-var">tickish</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141103"><span class="hs-identifier hs-var">e'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-845"></span><span>
</span><span id="line-846"></span><span class="hs-comment">-- There is a problem here. The then and else branches</span><span>
</span><span id="line-847"></span><span class="hs-comment">-- have no free variables, so they are open to lifting.</span><span>
</span><span id="line-848"></span><span class="hs-comment">-- We need someway of stopping this.</span><span>
</span><span id="line-849"></span><span class="hs-comment">-- This will make no difference to binary coverage</span><span>
</span><span id="line-850"></span><span class="hs-comment">-- (did you go here: YES or NO), but will effect accurate</span><span>
</span><span id="line-851"></span><span class="hs-comment">-- tick counting.</span><span>
</span><span id="line-852"></span><span>
</span><span id="line-853"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsBinTick"><span class="hs-identifier hs-type">HsBinTick</span></a></span><span> </span><span class="annot"><span class="annottext">XBinTick GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141100"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681141100"><span class="hs-identifier hs-var">ixT</span></a></span></span><span> </span><span id="local-6989586621681141099"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681141099"><span class="hs-identifier hs-var">ixF</span></a></span></span><span> </span><span id="local-6989586621681141098"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141098"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-854"></span><span>  </span><span id="local-6989586621681141097"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141097"><span class="hs-identifier hs-var">e2</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier hs-var">dsLExpr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141098"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-855"></span><span>  </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span class="hs-identifier">exprType</span><span> </span><span class="hs-identifier">e2</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">eqType</span><span class="hs-special">`</span><span> </span><span class="hs-identifier">boolTy</span><span class="hs-special">)</span><span>
</span><span id="line-856"></span><span>       </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; CoreExpr -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Utils.html#mkBinaryTickBox"><span class="hs-identifier hs-var">mkBinaryTickBox</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681141100"><span class="hs-identifier hs-var">ixT</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681141099"><span class="hs-identifier hs-var">ixF</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141097"><span class="hs-identifier hs-var">e2</span></a></span><span>
</span><span id="line-857"></span><span>     </span><span class="hs-special">}</span><span>
</span><span id="line-858"></span><span>
</span><span id="line-859"></span><span class="hs-comment">-- HsSyn constructs that just shouldn't be here:</span><span>
</span><span id="line-860"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsBracket"><span class="hs-identifier hs-type">HsBracket</span></a></span><span>     </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; DsM CoreExpr
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dsExpr:HsBracket&quot;</span></span><span>
</span><span id="line-861"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsDo"><span class="hs-identifier hs-type">HsDo</span></a></span><span>          </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; DsM CoreExpr
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dsExpr:HsDo&quot;</span></span><span>
</span><span id="line-862"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsRecFld"><span class="hs-identifier hs-type">HsRecFld</span></a></span><span>      </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; DsM CoreExpr
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dsExpr:HsRecFld&quot;</span></span><span>
</span><span id="line-863"></span><span>
</span><span id="line-864"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#ds_prag_expr"><span class="hs-identifier hs-type">ds_prag_expr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#HsPragE"><span class="hs-identifier hs-type">HsPragE</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#LHsExpr"><span class="hs-identifier hs-type">LHsExpr</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#DsM"><span class="hs-identifier hs-type">DsM</span></a></span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span>
</span><span id="line-865"></span><span id="ds_prag_expr"><span class="annot"><span class="annottext">ds_prag_expr :: HsPragE GhcTc -&gt; LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#ds_prag_expr"><span class="hs-identifier hs-var hs-var">ds_prag_expr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsPragSCC"><span class="hs-identifier hs-type">HsPragSCC</span></a></span><span> </span><span class="annot"><span class="annottext">XSCC GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">SourceText
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141090"><span class="annot"><span class="annottext">StringLiteral
</span><a href="#local-6989586621681141090"><span class="hs-identifier hs-var">cc</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681141089"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141089"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-866"></span><span>    </span><span id="local-6989586621681141088"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681141088"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env DsGblEnv DsLclEnv) DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-867"></span><span>    </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#sccProfilingEnabled"><span class="hs-identifier hs-var">sccProfilingEnabled</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681141088"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-868"></span><span>      </span><span class="hs-keyword">then</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-869"></span><span>        </span><span id="local-6989586621681141086"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681141086"><span class="hs-identifier hs-var">mod_name</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env DsGblEnv DsLclEnv) Module
forall (m :: * -&gt; *). HasModule m =&gt; m Module
</span><a href="GHC.Unit.Module.html#getModule"><span class="hs-identifier hs-var">getModule</span></a></span><span>
</span><span id="line-870"></span><span>        </span><span id="local-6989586621681141084"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681141084"><span class="hs-identifier hs-var">count</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">GeneralFlag -&gt; TcRnIf DsGblEnv DsLclEnv Bool
forall gbl lcl. GeneralFlag -&gt; TcRnIf gbl lcl Bool
</span><a href="GHC.Tc.Utils.Monad.html#goptM"><span class="hs-identifier hs-var">goptM</span></a></span><span> </span><span class="annot"><span class="annottext">GeneralFlag
</span><a href="GHC.Driver.Flags.html#Opt_ProfCountEntries"><span class="hs-identifier hs-var">Opt_ProfCountEntries</span></a></span><span>
</span><span id="line-871"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681141081"><span class="annot"><span class="annottext">nm :: FieldLabelString
</span><a href="#local-6989586621681141081"><span class="hs-identifier hs-var hs-var">nm</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">StringLiteral -&gt; FieldLabelString
</span><a href="GHC.Types.Basic.html#sl_fs"><span class="hs-identifier hs-var hs-var">sl_fs</span></a></span><span> </span><span class="annot"><span class="annottext">StringLiteral
</span><a href="#local-6989586621681141090"><span class="hs-identifier hs-var">cc</span></a></span><span>
</span><span id="line-872"></span><span>        </span><span id="local-6989586621681141079"><span class="annot"><span class="annottext">CCFlavour
</span><a href="#local-6989586621681141079"><span class="hs-identifier hs-var">flavour</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CostCentreIndex -&gt; CCFlavour
</span><a href="GHC.Types.CostCentre.html#ExprCC"><span class="hs-identifier hs-var">ExprCC</span></a></span><span> </span><span class="annot"><span class="annottext">(CostCentreIndex -&gt; CCFlavour)
-&gt; IOEnv (Env DsGblEnv DsLclEnv) CostCentreIndex
-&gt; IOEnv (Env DsGblEnv DsLclEnv) CCFlavour
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLabelString -&gt; IOEnv (Env DsGblEnv DsLclEnv) CostCentreIndex
forall gbl lcl.
ContainsCostCentreState gbl =&gt;
FieldLabelString -&gt; TcRnIf gbl lcl CostCentreIndex
</span><a href="GHC.Tc.Utils.Monad.html#getCCIndexM"><span class="hs-identifier hs-var">getCCIndexM</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLabelString
</span><a href="#local-6989586621681141081"><span class="hs-identifier hs-var">nm</span></a></span><span>
</span><span id="line-873"></span><span>        </span><span class="annot"><span class="annottext">Tickish Id -&gt; CoreExpr -&gt; CoreExpr
forall b. Tickish Id -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#Tick"><span class="hs-identifier hs-var">Tick</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CostCentre -&gt; Bool -&gt; Bool -&gt; Tickish Id
forall id. CostCentre -&gt; Bool -&gt; Bool -&gt; Tickish id
</span><a href="GHC.Core.html#ProfNote"><span class="hs-identifier hs-var">ProfNote</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldLabelString -&gt; Module -&gt; SrcSpan -&gt; CCFlavour -&gt; CostCentre
</span><a href="GHC.Types.CostCentre.html#mkUserCC"><span class="hs-identifier hs-var">mkUserCC</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLabelString
</span><a href="#local-6989586621681141081"><span class="hs-identifier hs-var">nm</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681141086"><span class="hs-identifier hs-var">mod_name</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; SrcSpan
forall l e. GenLocated l e -&gt; l
</span><a href="GHC.Types.SrcLoc.html#getLoc"><span class="hs-identifier hs-var">getLoc</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141089"><span class="hs-identifier hs-var">expr</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CCFlavour
</span><a href="#local-6989586621681141079"><span class="hs-identifier hs-var">flavour</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681141084"><span class="hs-identifier hs-var">count</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">)</span><span>
</span><span id="line-874"></span><span>               </span><span class="annot"><span class="annottext">(CoreExpr -&gt; CoreExpr) -&gt; DsM CoreExpr -&gt; DsM CoreExpr
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier hs-var">dsLExpr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141089"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-875"></span><span>      </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier hs-var">dsLExpr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141089"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-876"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#ds_prag_expr"><span class="hs-identifier hs-var">ds_prag_expr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsPragTick"><span class="hs-identifier hs-type">HsPragTick</span></a></span><span> </span><span class="annot"><span class="annottext">XTickPragma GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">SourceText
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">(StringLiteral, (Int, Int), (Int, Int))
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">((SourceText, SourceText), (SourceText, SourceText))
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681141072"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141072"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-877"></span><span>  </span><span id="local-6989586621681141071"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681141071"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env DsGblEnv DsLclEnv) DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-878"></span><span>  </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">GeneralFlag -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#gopt"><span class="hs-identifier hs-var">gopt</span></a></span><span> </span><span class="annot"><span class="annottext">GeneralFlag
</span><a href="GHC.Driver.Flags.html#Opt_Hpc"><span class="hs-identifier hs-var">Opt_Hpc</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681141071"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-879"></span><span>    </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">String -&gt; DsM CoreExpr
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dsExpr:HsPragTick&quot;</span></span><span>
</span><span id="line-880"></span><span>    </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier hs-var">dsLExpr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141072"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-881"></span><span>
</span><span id="line-882"></span><span class="hs-comment">------------------------------</span><span>
</span><span id="line-883"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsSyntaxExpr"><span class="hs-identifier hs-type">dsSyntaxExpr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#SyntaxExpr"><span class="hs-identifier hs-type">SyntaxExpr</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#DsM"><span class="hs-identifier hs-type">DsM</span></a></span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span>
</span><span id="line-884"></span><span id="dsSyntaxExpr"><span class="annot"><span class="annottext">dsSyntaxExpr :: SyntaxExpr GhcTc -&gt; [CoreExpr] -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsSyntaxExpr"><span class="hs-identifier hs-var hs-var">dsSyntaxExpr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#SyntaxExprTc"><span class="hs-identifier hs-type">SyntaxExprTc</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">syn_expr :: SyntaxExprTc -&gt; HsExpr GhcTc
</span><a href="GHC.Hs.Expr.html#syn_expr"><span class="hs-identifier hs-var">syn_expr</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681141066"><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681141066"><span class="hs-identifier hs-var">expr</span></a></span></span><span>
</span><span id="line-885"></span><span>                           </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">syn_arg_wraps :: SyntaxExprTc -&gt; [HsWrapper]
</span><a href="GHC.Hs.Expr.html#syn_arg_wraps"><span class="hs-identifier hs-var">syn_arg_wraps</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681141064"><span class="annot"><span class="annottext">[HsWrapper]
</span><a href="#local-6989586621681141064"><span class="hs-identifier hs-var">arg_wraps</span></a></span></span><span>
</span><span id="line-886"></span><span>                           </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">syn_res_wrap :: SyntaxExprTc -&gt; HsWrapper
</span><a href="GHC.Hs.Expr.html#syn_res_wrap"><span class="hs-identifier hs-var">syn_res_wrap</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681141062"><span class="annot"><span class="annottext">HsWrapper
</span><a href="#local-6989586621681141062"><span class="hs-identifier hs-var">res_wrap</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-887"></span><span>             </span><span id="local-6989586621681141061"><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621681141061"><span class="hs-identifier hs-var">arg_exprs</span></a></span></span><span>
</span><span id="line-888"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681141060"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141060"><span class="hs-identifier hs-var">fun</span></a></span></span><span>            </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681141066"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-889"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681141059"><span class="annot"><span class="annottext">[CoreExpr -&gt; CoreExpr]
</span><a href="#local-6989586621681141059"><span class="hs-identifier hs-var">core_arg_wraps</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(HsWrapper -&gt; IOEnv (Env DsGblEnv DsLclEnv) (CoreExpr -&gt; CoreExpr))
-&gt; [HsWrapper]
-&gt; IOEnv (Env DsGblEnv DsLclEnv) [CoreExpr -&gt; CoreExpr]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">HsWrapper -&gt; IOEnv (Env DsGblEnv DsLclEnv) (CoreExpr -&gt; CoreExpr)
</span><a href="GHC.HsToCore.Binds.html#dsHsWrapper"><span class="hs-identifier hs-var">dsHsWrapper</span></a></span><span> </span><span class="annot"><span class="annottext">[HsWrapper]
</span><a href="#local-6989586621681141064"><span class="hs-identifier hs-var">arg_wraps</span></a></span><span>
</span><span id="line-890"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681141057"><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621681141057"><span class="hs-identifier hs-var">core_res_wrap</span></a></span></span><span>  </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HsWrapper -&gt; IOEnv (Env DsGblEnv DsLclEnv) (CoreExpr -&gt; CoreExpr)
</span><a href="GHC.HsToCore.Binds.html#dsHsWrapper"><span class="hs-identifier hs-var">dsHsWrapper</span></a></span><span> </span><span class="annot"><span class="annottext">HsWrapper
</span><a href="#local-6989586621681141062"><span class="hs-identifier hs-var">res_wrap</span></a></span><span>
</span><span id="line-891"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681141056"><span class="annot"><span class="annottext">wrapped_args :: [CoreExpr]
</span><a href="#local-6989586621681141056"><span class="hs-identifier hs-var hs-var">wrapped_args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
-&gt; ((CoreExpr -&gt; CoreExpr) -&gt; CoreExpr -&gt; CoreExpr)
-&gt; [CoreExpr -&gt; CoreExpr]
-&gt; [CoreExpr]
-&gt; [CoreExpr]
forall a b c. String -&gt; (a -&gt; b -&gt; c) -&gt; [a] -&gt; [b] -&gt; [c]
</span><a href="GHC.Utils.Misc.html#zipWithEqual"><span class="hs-identifier hs-var">zipWithEqual</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dsSyntaxExpr&quot;</span></span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; CoreExpr) -&gt; CoreExpr -&gt; CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">($)</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExpr -&gt; CoreExpr]
</span><a href="#local-6989586621681141059"><span class="hs-identifier hs-var">core_arg_wraps</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621681141061"><span class="hs-identifier hs-var">arg_exprs</span></a></span><span>
</span><span id="line-892"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env DsGblEnv DsLclEnv) ()
-&gt; (() -&gt; CoreExpr) -&gt; DsM CoreExpr
forall a. DsM a -&gt; (a -&gt; CoreExpr) -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Monad.html#dsWhenNoErrs"><span class="hs-identifier hs-var">dsWhenNoErrs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(CoreExpr -&gt; SDoc -&gt; IOEnv (Env DsGblEnv DsLclEnv) ())
-&gt; [CoreExpr] -&gt; [SDoc] -&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
forall (m :: * -&gt; *) a b c.
Applicative m =&gt;
(a -&gt; b -&gt; m c) -&gt; [a] -&gt; [b] -&gt; m ()
</span><a href="../../base/src/Control.Monad.html#zipWithM_"><span class="hs-identifier hs-var">zipWithM_</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; SDoc -&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
</span><a href="GHC.HsToCore.Monad.html#dsNoLevPolyExpr"><span class="hs-identifier hs-var">dsNoLevPolyExpr</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621681141056"><span class="hs-identifier hs-var">wrapped_args</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Int -&gt; SDoc
</span><a href="#local-6989586621681141054"><span class="hs-identifier hs-var">mk_doc</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681141053"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621681141053"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681141053"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-glyph">..</span><span class="hs-special">]</span><span> </span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-893"></span><span>                      </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">()
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621681141057"><span class="hs-identifier hs-var">core_res_wrap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreExpr -&gt; [CoreExpr] -&gt; CoreExpr
</span><a href="GHC.Core.Make.html#mkCoreApps"><span class="hs-identifier hs-var">mkCoreApps</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141060"><span class="hs-identifier hs-var">fun</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621681141056"><span class="hs-identifier hs-var">wrapped_args</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-894"></span><span>                      </span><span class="hs-comment">-- Use mkCoreApps instead of mkApps:</span><span>
</span><span id="line-895"></span><span>                      </span><span class="hs-comment">-- unboxed types are possible with RebindableSyntax (#19883)</span><span>
</span><span id="line-896"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-897"></span><span>    </span><span id="local-6989586621681141054"><span class="annot"><span class="annottext">mk_doc :: Int -&gt; SDoc
</span><a href="#local-6989586621681141054"><span class="hs-identifier hs-var hs-var">mk_doc</span></a></span></span><span> </span><span id="local-6989586621681141052"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681141052"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;In the&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#speakNth"><span class="hs-identifier hs-var">speakNth</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681141052"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;argument of&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsExpr GhcTc -&gt; SDoc
forall {a}. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681141066"><span class="hs-identifier hs-var">expr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-898"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsSyntaxExpr"><span class="hs-identifier hs-var">dsSyntaxExpr</span></a></span><span> </span><span class="annot"><span class="annottext">SyntaxExpr GhcTc
SyntaxExprTc
</span><a href="GHC.Hs.Expr.html#NoSyntaxExprTc"><span class="hs-identifier hs-var">NoSyntaxExprTc</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExpr]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; DsM CoreExpr
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dsSyntaxExpr&quot;</span></span><span>
</span><span id="line-899"></span><span>
</span><span id="line-900"></span><span id="local-6989586621681142231"><span class="annot"><a href="GHC.HsToCore.Expr.html#findField"><span class="hs-identifier hs-type">findField</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Pat.html#LHsRecField"><span class="hs-identifier hs-type">LHsRecField</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681142231"><span class="hs-identifier hs-type">arg</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621681142231"><span class="hs-identifier hs-type">arg</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-901"></span><span id="findField"><span class="annot"><span class="annottext">findField :: forall arg. [LHsRecField GhcTc arg] -&gt; Name -&gt; [arg]
</span><a href="GHC.HsToCore.Expr.html#findField"><span class="hs-identifier hs-var hs-var">findField</span></a></span></span><span> </span><span id="local-6989586621681141046"><span class="annot"><span class="annottext">[LHsRecField GhcTc arg]
</span><a href="#local-6989586621681141046"><span class="hs-identifier hs-var">rbinds</span></a></span></span><span> </span><span id="local-6989586621681141045"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681141045"><span class="hs-identifier hs-var">sel</span></a></span></span><span>
</span><span id="line-902"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">HsRecField' (FieldOcc GhcTc) arg -&gt; arg
forall id arg. HsRecField' id arg -&gt; arg
</span><a href="GHC.Hs.Pat.html#hsRecFieldArg"><span class="hs-identifier hs-var hs-var">hsRecFieldArg</span></a></span><span> </span><span class="annot"><span class="annottext">HsRecField' (FieldOcc GhcTc) arg
</span><a href="#local-6989586621681141044"><span class="hs-identifier hs-var">fld</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681141044"><span class="annot"><span class="annottext">HsRecField' (FieldOcc GhcTc) arg
</span><a href="#local-6989586621681141044"><span class="hs-identifier hs-var">fld</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[LHsRecField GhcTc arg]
</span><a href="#local-6989586621681141046"><span class="hs-identifier hs-var">rbinds</span></a></span><span>
</span><span id="line-903"></span><span>                       </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681141045"><span class="hs-identifier hs-var">sel</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; Name -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Name
</span><a href="GHC.Types.Id.html#idName"><span class="hs-identifier hs-var">idName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenLocated SrcSpan Id -&gt; Id
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">(GenLocated SrcSpan Id -&gt; Id) -&gt; GenLocated SrcSpan Id -&gt; Id
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HsRecField' (FieldOcc GhcTc) arg -&gt; GenLocated SrcSpan Id
forall arg. HsRecField GhcTc arg -&gt; GenLocated SrcSpan Id
</span><a href="GHC.Hs.Pat.html#hsRecFieldId"><span class="hs-identifier hs-var">hsRecFieldId</span></a></span><span> </span><span class="annot"><span class="annottext">HsRecField' (FieldOcc GhcTc) arg
</span><a href="#local-6989586621681141044"><span class="hs-identifier hs-var">fld</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-904"></span><span>
</span><span id="line-905"></span><span class="hs-comment">{-
%--------------------------------------------------------------------

Note [Desugaring explicit lists]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Explicit lists are desugared in a cleverer way to prevent some
fruitless allocations.  Essentially, whenever we see a list literal
[x_1, ..., x_n] we generate the corresponding expression in terms of
build:

Explicit lists (literals) are desugared to allow build/foldr fusion when
beneficial. This is a bit of a trade-off,

 * build/foldr fusion can generate far larger code than the corresponding
   cons-chain (e.g. see #11707)

 * even when it doesn't produce more code, build can still fail to fuse,
   requiring that the simplifier do more work to bring the expression
   back into cons-chain form; this costs compile time

 * when it works, fusion can be a significant win. Allocations are reduced
   by up to 25% in some nofib programs. Specifically,

        Program           Size    Allocs   Runtime  CompTime
        rewrite          +0.0%    -26.3%      0.02     -1.8%
           ansi          -0.3%    -13.8%      0.00     +0.0%
           lift          +0.0%     -8.7%      0.00     -2.3%

At the moment we use a simple heuristic to determine whether build will be
fruitful: for small lists we assume the benefits of fusion will be worthwhile;
for long lists we assume that the benefits will be outweighted by the cost of
code duplication. This magic length threshold is @maxBuildLength@. Also, fusion
won't work at all if rewrite rules are disabled, so we don't use the build-based
desugaring in this case.

We used to have a more complex heuristic which would try to break the list into
&quot;static&quot; and &quot;dynamic&quot; parts and only build-desugar the dynamic part.
Unfortunately, determining &quot;static-ness&quot; reliably is a bit tricky and the
heuristic at times produced surprising behavior (see #11710) so it was dropped.
-}</span><span>
</span><span id="line-945"></span><span>
</span><span id="line-946"></span><span class="hs-comment">{- | The longest list length which we will desugar using @build@.

This is essentially a magic number and its setting is unfortunate rather
arbitrary. The idea here, as mentioned in Note [Desugaring explicit lists],
is to avoid deforesting large static data into large(r) code. Ideally we'd
want a smaller threshold with larger consumers and vice-versa, but we have no
way of knowing what will be consuming our list in the desugaring impossible to
set generally correctly.

The effect of reducing this number will be that 'build' fusion is applied
less often. From a runtime performance perspective, applying 'build' more
liberally on &quot;moderately&quot; sized lists should rarely hurt and will often it can
only expose further optimization opportunities; if no fusion is possible it will
eventually get rule-rewritten back to a list). We do, however, pay in compile
time.
-}</span><span>
</span><span id="line-962"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#maxBuildLength"><span class="hs-identifier hs-type">maxBuildLength</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-963"></span><span id="maxBuildLength"><span class="annot"><span class="annottext">maxBuildLength :: Int
</span><a href="GHC.HsToCore.Expr.html#maxBuildLength"><span class="hs-identifier hs-var hs-var">maxBuildLength</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">32</span></span><span>
</span><span id="line-964"></span><span>
</span><span id="line-965"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExplicitList"><span class="hs-identifier hs-type">dsExplicitList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#SyntaxExpr"><span class="hs-identifier hs-type">SyntaxExpr</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Expr.html#LHsExpr"><span class="hs-identifier hs-type">LHsExpr</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-966"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#DsM"><span class="hs-identifier hs-type">DsM</span></a></span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span>
</span><span id="line-967"></span><span class="hs-comment">-- See Note [Desugaring explicit lists]</span><span>
</span><span id="line-968"></span><span id="dsExplicitList"><span class="annot"><span class="annottext">dsExplicitList :: Type -&gt; Maybe (SyntaxExpr GhcTc) -&gt; [LHsExpr GhcTc] -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsExplicitList"><span class="hs-identifier hs-var hs-var">dsExplicitList</span></a></span></span><span> </span><span id="local-6989586621681141041"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681141041"><span class="hs-identifier hs-var">elt_ty</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe (SyntaxExpr GhcTc)
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span id="local-6989586621681141040"><span class="annot"><span class="annottext">[LHsExpr GhcTc]
</span><a href="#local-6989586621681141040"><span class="hs-identifier hs-var">xs</span></a></span></span><span>
</span><span id="line-969"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681141039"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681141039"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env DsGblEnv DsLclEnv) DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-970"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681141038"><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621681141038"><span class="hs-identifier hs-var">xs'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(LHsExpr GhcTc -&gt; DsM CoreExpr)
-&gt; [LHsExpr GhcTc] -&gt; DsM [CoreExpr]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExprNoLP"><span class="hs-identifier hs-var">dsLExprNoLP</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsExpr GhcTc]
</span><a href="#local-6989586621681141040"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-971"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621681141038"><span class="hs-identifier hs-var">xs'</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExpr] -&gt; Int -&gt; Bool
forall a. [a] -&gt; Int -&gt; Bool
</span><a href="GHC.Utils.Misc.html#lengthExceeds"><span class="hs-operator hs-var">`lengthExceeds`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="GHC.HsToCore.Expr.html#maxBuildLength"><span class="hs-identifier hs-var">maxBuildLength</span></a></span><span>
</span><span id="line-972"></span><span>                </span><span class="hs-comment">-- Don't generate builds if the list is very long.</span><span>
</span><span id="line-973"></span><span>         </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">[CoreExpr] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621681141038"><span class="hs-identifier hs-var">xs'</span></a></span><span>
</span><span id="line-974"></span><span>                </span><span class="hs-comment">-- Don't generate builds when the [] constructor will do</span><span>
</span><span id="line-975"></span><span>         </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GeneralFlag -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#gopt"><span class="hs-identifier hs-var">gopt</span></a></span><span> </span><span class="annot"><span class="annottext">GeneralFlag
</span><a href="GHC.Driver.Flags.html#Opt_EnableRewriteRules"><span class="hs-identifier hs-var">Opt_EnableRewriteRules</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681141039"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span>  </span><span class="hs-comment">-- Rewrite rules off</span><span>
</span><span id="line-976"></span><span>                </span><span class="hs-comment">-- Don't generate a build if there are no rules to eliminate it!</span><span>
</span><span id="line-977"></span><span>                </span><span class="hs-comment">-- See Note [Desugaring RULE left hand sides] in GHC.HsToCore</span><span>
</span><span id="line-978"></span><span>         </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; DsM CoreExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; DsM CoreExpr) -&gt; CoreExpr -&gt; DsM CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; [CoreExpr] -&gt; CoreExpr
</span><a href="GHC.Core.Make.html#mkListExpr"><span class="hs-identifier hs-var">mkListExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681141041"><span class="hs-identifier hs-var">elt_ty</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621681141038"><span class="hs-identifier hs-var">xs'</span></a></span><span>
</span><span id="line-979"></span><span>         </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Type -&gt; ((Id, Type) -&gt; (Id, Type) -&gt; DsM CoreExpr) -&gt; DsM CoreExpr
forall (m :: * -&gt; *).
(MonadFail m, MonadThings m, MonadUnique m) =&gt;
Type -&gt; ((Id, Type) -&gt; (Id, Type) -&gt; m CoreExpr) -&gt; m CoreExpr
</span><a href="GHC.Core.Make.html#mkBuildExpr"><span class="hs-identifier hs-var">mkBuildExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681141041"><span class="hs-identifier hs-var">elt_ty</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[CoreExpr] -&gt; (Id, Type) -&gt; (Id, Type) -&gt; DsM CoreExpr
forall {m :: * -&gt; *} {t :: * -&gt; *} {b} {b} {b}.
(Monad m, Foldable t) =&gt;
t (Arg b) -&gt; (Id, b) -&gt; (Id, b) -&gt; m (Arg b)
</span><a href="#local-6989586621681141033"><span class="hs-identifier hs-var">mk_build_list</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621681141038"><span class="hs-identifier hs-var">xs'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-980"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-981"></span><span>    </span><span id="local-6989586621681141033"><span class="annot"><span class="annottext">mk_build_list :: t (Arg b) -&gt; (Id, b) -&gt; (Id, b) -&gt; m (Arg b)
</span><a href="#local-6989586621681141033"><span class="hs-identifier hs-var hs-var">mk_build_list</span></a></span></span><span> </span><span id="local-6989586621681141028"><span class="annot"><span class="annottext">t (Arg b)
</span><a href="#local-6989586621681141028"><span class="hs-identifier hs-var">xs'</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681141027"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141027"><span class="hs-identifier hs-var">cons</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">b
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681141026"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141026"><span class="hs-identifier hs-var">nil</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">b
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>
</span><span id="line-982"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Arg b -&gt; m (Arg b)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Arg b -&gt; Arg b -&gt; Arg b) -&gt; Arg b -&gt; t (Arg b) -&gt; Arg b
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Arg b -&gt; Arg b -&gt; Arg b
forall b. Expr b -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#App"><span class="hs-identifier hs-var">App</span></a></span><span> </span><span class="annot"><span class="annottext">(Arg b -&gt; Arg b -&gt; Arg b)
-&gt; (Arg b -&gt; Arg b) -&gt; Arg b -&gt; Arg b -&gt; Arg b
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Arg b -&gt; Arg b -&gt; Arg b
forall b. Expr b -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#App"><span class="hs-identifier hs-var">App</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Arg b
forall b. Id -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141027"><span class="hs-identifier hs-var">cons</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Arg b
forall b. Id -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681141026"><span class="hs-identifier hs-var">nil</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">t (Arg b)
</span><a href="#local-6989586621681141028"><span class="hs-identifier hs-var">xs'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-983"></span><span>
</span><span id="line-984"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsExplicitList"><span class="hs-identifier hs-var">dsExplicitList</span></a></span><span> </span><span id="local-6989586621681141024"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681141024"><span class="hs-identifier hs-var">elt_ty</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681141023"><span class="annot"><span class="annottext">SyntaxExpr GhcTc
</span><a href="#local-6989586621681141023"><span class="hs-identifier hs-var">fln</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681141022"><span class="annot"><span class="annottext">[LHsExpr GhcTc]
</span><a href="#local-6989586621681141022"><span class="hs-identifier hs-var">xs</span></a></span></span><span>
</span><span id="line-985"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681141021"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141021"><span class="hs-identifier hs-var">list</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Type -&gt; Maybe (SyntaxExpr GhcTc) -&gt; [LHsExpr GhcTc] -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsExplicitList"><span class="hs-identifier hs-var">dsExplicitList</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681141024"><span class="hs-identifier hs-var">elt_ty</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (SyntaxExpr GhcTc)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsExpr GhcTc]
</span><a href="#local-6989586621681141022"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-986"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681141020"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681141020"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env DsGblEnv DsLclEnv) DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-987"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681141019"><span class="annot"><span class="annottext">platform :: Platform
</span><a href="#local-6989586621681141019"><span class="hs-identifier hs-var hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Platform
</span><a href="GHC.Driver.Session.html#targetPlatform"><span class="hs-identifier hs-var hs-var">targetPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681141020"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-988"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">SyntaxExpr GhcTc -&gt; [CoreExpr] -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsSyntaxExpr"><span class="hs-identifier hs-var">dsSyntaxExpr</span></a></span><span> </span><span class="annot"><span class="annottext">SyntaxExpr GhcTc
</span><a href="#local-6989586621681141023"><span class="hs-identifier hs-var">fln</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Platform -&gt; Int -&gt; CoreExpr
</span><a href="GHC.Core.Make.html#mkIntExprInt"><span class="hs-identifier hs-var">mkIntExprInt</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681141019"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[LHsExpr GhcTc] -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsExpr GhcTc]
</span><a href="#local-6989586621681141022"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141021"><span class="hs-identifier hs-var">list</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-989"></span><span>
</span><span id="line-990"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsArithSeq"><span class="hs-identifier hs-type">dsArithSeq</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#PostTcExpr"><span class="hs-identifier hs-type">PostTcExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#ArithSeqInfo"><span class="hs-identifier hs-type">ArithSeqInfo</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#DsM"><span class="hs-identifier hs-type">DsM</span></a></span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span>
</span><span id="line-991"></span><span id="dsArithSeq"><span class="annot"><span class="annottext">dsArithSeq :: HsExpr GhcTc -&gt; ArithSeqInfo GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsArithSeq"><span class="hs-identifier hs-var hs-var">dsArithSeq</span></a></span></span><span> </span><span id="local-6989586621681141016"><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681141016"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#From"><span class="hs-identifier hs-type">From</span></a></span><span> </span><span id="local-6989586621681141014"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141014"><span class="hs-identifier hs-var">from</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-992"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExpr -&gt; CoreExpr
forall b. Expr b -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#App"><span class="hs-identifier hs-var">App</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; CoreExpr -&gt; CoreExpr)
-&gt; DsM CoreExpr
-&gt; IOEnv (Env DsGblEnv DsLclEnv) (CoreExpr -&gt; CoreExpr)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681141016"><span class="hs-identifier hs-var">expr</span></a></span><span> </span><span class="annot"><span class="annottext">IOEnv (Env DsGblEnv DsLclEnv) (CoreExpr -&gt; CoreExpr)
-&gt; DsM CoreExpr -&gt; DsM CoreExpr
forall (f :: * -&gt; *) a b. Applicative f =&gt; f (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var">&lt;*&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExprNoLP"><span class="hs-identifier hs-var">dsLExprNoLP</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141014"><span class="hs-identifier hs-var">from</span></a></span><span>
</span><span id="line-993"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsArithSeq"><span class="hs-identifier hs-var">dsArithSeq</span></a></span><span> </span><span id="local-6989586621681141013"><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681141013"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#FromTo"><span class="hs-identifier hs-type">FromTo</span></a></span><span> </span><span id="local-6989586621681141011"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141011"><span class="hs-identifier hs-var">from</span></a></span></span><span> </span><span id="local-6989586621681141010"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141010"><span class="hs-identifier hs-var">to</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-994"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621681141009"><span class="annot"><span class="annottext">FamInstEnvs
</span><a href="#local-6989586621681141009"><span class="hs-identifier hs-var">fam_envs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">DsM FamInstEnvs
</span><a href="GHC.HsToCore.Monad.html#dsGetFamInstEnvs"><span class="hs-identifier hs-var">dsGetFamInstEnvs</span></a></span><span>
</span><span id="line-995"></span><span>       </span><span id="local-6989586621681141007"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681141007"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env DsGblEnv DsLclEnv) DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-996"></span><span>       </span><span class="annot"><span class="annottext">FamInstEnvs
-&gt; DynFlags
-&gt; LHsExpr GhcTc
-&gt; Maybe (LHsExpr GhcTc)
-&gt; LHsExpr GhcTc
-&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
</span><a href="GHC.HsToCore.Match.Literal.html#warnAboutEmptyEnumerations"><span class="hs-identifier hs-var">warnAboutEmptyEnumerations</span></a></span><span> </span><span class="annot"><span class="annottext">FamInstEnvs
</span><a href="#local-6989586621681141009"><span class="hs-identifier hs-var">fam_envs</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681141007"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141011"><span class="hs-identifier hs-var">from</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (LHsExpr GhcTc)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141010"><span class="hs-identifier hs-var">to</span></a></span><span>
</span><span id="line-997"></span><span>       </span><span id="local-6989586621681141005"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141005"><span class="hs-identifier hs-var">expr'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681141013"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-998"></span><span>       </span><span id="local-6989586621681141004"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141004"><span class="hs-identifier hs-var">from'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExprNoLP"><span class="hs-identifier hs-var">dsLExprNoLP</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141011"><span class="hs-identifier hs-var">from</span></a></span><span>
</span><span id="line-999"></span><span>       </span><span id="local-6989586621681141003"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141003"><span class="hs-identifier hs-var">to'</span></a></span></span><span>   </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExprNoLP"><span class="hs-identifier hs-var">dsLExprNoLP</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681141010"><span class="hs-identifier hs-var">to</span></a></span><span>
</span><span id="line-1000"></span><span>       </span><span class="annot"><span class="annottext">CoreExpr -&gt; DsM CoreExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; DsM CoreExpr) -&gt; CoreExpr -&gt; DsM CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; [CoreExpr] -&gt; CoreExpr
forall b. Expr b -&gt; [Expr b] -&gt; Expr b
</span><a href="GHC.Core.html#mkApps"><span class="hs-identifier hs-var">mkApps</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141005"><span class="hs-identifier hs-var">expr'</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141004"><span class="hs-identifier hs-var">from'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681141003"><span class="hs-identifier hs-var">to'</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1001"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsArithSeq"><span class="hs-identifier hs-var">dsArithSeq</span></a></span><span> </span><span id="local-6989586621681141001"><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681141001"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#FromThen"><span class="hs-identifier hs-type">FromThen</span></a></span><span> </span><span id="local-6989586621681140999"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140999"><span class="hs-identifier hs-var">from</span></a></span></span><span> </span><span id="local-6989586621681140998"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140998"><span class="hs-identifier hs-var">thn</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-1002"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; [CoreExpr] -&gt; CoreExpr
forall b. Expr b -&gt; [Expr b] -&gt; Expr b
</span><a href="GHC.Core.html#mkApps"><span class="hs-identifier hs-var">mkApps</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; [CoreExpr] -&gt; CoreExpr)
-&gt; DsM CoreExpr
-&gt; IOEnv (Env DsGblEnv DsLclEnv) ([CoreExpr] -&gt; CoreExpr)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681141001"><span class="hs-identifier hs-var">expr</span></a></span><span> </span><span class="annot"><span class="annottext">IOEnv (Env DsGblEnv DsLclEnv) ([CoreExpr] -&gt; CoreExpr)
-&gt; DsM [CoreExpr] -&gt; DsM CoreExpr
forall (f :: * -&gt; *) a b. Applicative f =&gt; f (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var">&lt;*&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">(LHsExpr GhcTc -&gt; DsM CoreExpr)
-&gt; [LHsExpr GhcTc] -&gt; DsM [CoreExpr]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExprNoLP"><span class="hs-identifier hs-var">dsLExprNoLP</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140999"><span class="hs-identifier hs-var">from</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140998"><span class="hs-identifier hs-var">thn</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1003"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsArithSeq"><span class="hs-identifier hs-var">dsArithSeq</span></a></span><span> </span><span id="local-6989586621681140997"><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681140997"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#FromThenTo"><span class="hs-identifier hs-type">FromThenTo</span></a></span><span> </span><span id="local-6989586621681140995"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140995"><span class="hs-identifier hs-var">from</span></a></span></span><span> </span><span id="local-6989586621681140994"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140994"><span class="hs-identifier hs-var">thn</span></a></span></span><span> </span><span id="local-6989586621681140993"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140993"><span class="hs-identifier hs-var">to</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-1004"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621681140992"><span class="annot"><span class="annottext">FamInstEnvs
</span><a href="#local-6989586621681140992"><span class="hs-identifier hs-var">fam_envs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">DsM FamInstEnvs
</span><a href="GHC.HsToCore.Monad.html#dsGetFamInstEnvs"><span class="hs-identifier hs-var">dsGetFamInstEnvs</span></a></span><span>
</span><span id="line-1005"></span><span>       </span><span id="local-6989586621681140991"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681140991"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env DsGblEnv DsLclEnv) DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-1006"></span><span>       </span><span class="annot"><span class="annottext">FamInstEnvs
-&gt; DynFlags
-&gt; LHsExpr GhcTc
-&gt; Maybe (LHsExpr GhcTc)
-&gt; LHsExpr GhcTc
-&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
</span><a href="GHC.HsToCore.Match.Literal.html#warnAboutEmptyEnumerations"><span class="hs-identifier hs-var">warnAboutEmptyEnumerations</span></a></span><span> </span><span class="annot"><span class="annottext">FamInstEnvs
</span><a href="#local-6989586621681140992"><span class="hs-identifier hs-var">fam_envs</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681140991"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140995"><span class="hs-identifier hs-var">from</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; Maybe (LHsExpr GhcTc)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140994"><span class="hs-identifier hs-var">thn</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140993"><span class="hs-identifier hs-var">to</span></a></span><span>
</span><span id="line-1007"></span><span>       </span><span id="local-6989586621681140990"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140990"><span class="hs-identifier hs-var">expr'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681140997"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-1008"></span><span>       </span><span id="local-6989586621681140989"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140989"><span class="hs-identifier hs-var">from'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExprNoLP"><span class="hs-identifier hs-var">dsLExprNoLP</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140995"><span class="hs-identifier hs-var">from</span></a></span><span>
</span><span id="line-1009"></span><span>       </span><span id="local-6989586621681140988"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140988"><span class="hs-identifier hs-var">thn'</span></a></span></span><span>  </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExprNoLP"><span class="hs-identifier hs-var">dsLExprNoLP</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140994"><span class="hs-identifier hs-var">thn</span></a></span><span>
</span><span id="line-1010"></span><span>       </span><span id="local-6989586621681140987"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140987"><span class="hs-identifier hs-var">to'</span></a></span></span><span>   </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExprNoLP"><span class="hs-identifier hs-var">dsLExprNoLP</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140993"><span class="hs-identifier hs-var">to</span></a></span><span>
</span><span id="line-1011"></span><span>       </span><span class="annot"><span class="annottext">CoreExpr -&gt; DsM CoreExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; DsM CoreExpr) -&gt; CoreExpr -&gt; DsM CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; [CoreExpr] -&gt; CoreExpr
forall b. Expr b -&gt; [Expr b] -&gt; Expr b
</span><a href="GHC.Core.html#mkApps"><span class="hs-identifier hs-var">mkApps</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140990"><span class="hs-identifier hs-var">expr'</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140989"><span class="hs-identifier hs-var">from'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140988"><span class="hs-identifier hs-var">thn'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140987"><span class="hs-identifier hs-var">to'</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1012"></span><span>
</span><span id="line-1013"></span><span class="hs-comment">{-
Desugar 'do' and 'mdo' expressions (NOT list comprehensions, they're
handled in GHC.HsToCore.ListComp).  Basically does the translation given in the
Haskell 98 report:
-}</span><span>
</span><span id="line-1018"></span><span>
</span><span id="line-1019"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsDo"><span class="hs-identifier hs-type">dsDo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#HsStmtContext"><span class="hs-identifier hs-type">HsStmtContext</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Expr.html#ExprLStmt"><span class="hs-identifier hs-type">ExprLStmt</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#DsM"><span class="hs-identifier hs-type">DsM</span></a></span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span>
</span><span id="line-1020"></span><span id="dsDo"><span class="annot"><span class="annottext">dsDo :: HsStmtContext GhcRn -&gt; [ExprLStmt GhcTc] -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsDo"><span class="hs-identifier hs-var hs-var">dsDo</span></a></span></span><span> </span><span id="local-6989586621681140986"><span class="annot"><span class="annottext">HsStmtContext GhcRn
</span><a href="#local-6989586621681140986"><span class="hs-identifier hs-var">ctx</span></a></span></span><span> </span><span id="local-6989586621681140985"><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><a href="#local-6989586621681140985"><span class="hs-identifier hs-var">stmts</span></a></span></span><span>
</span><span id="line-1021"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ExprLStmt GhcTc] -&gt; DsM CoreExpr
</span><a href="#local-6989586621681140984"><span class="hs-identifier hs-var">goL</span></a></span><span> </span><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><a href="#local-6989586621681140985"><span class="hs-identifier hs-var">stmts</span></a></span><span>
</span><span id="line-1022"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1023"></span><span>    </span><span id="local-6989586621681140984"><span class="annot"><span class="annottext">goL :: [ExprLStmt GhcTc] -&gt; DsM CoreExpr
</span><a href="#local-6989586621681140984"><span class="hs-identifier hs-var hs-var">goL</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; DsM CoreExpr
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dsDo&quot;</span></span><span>
</span><span id="line-1024"></span><span>    </span><span class="annot"><a href="#local-6989586621681140984"><span class="hs-identifier hs-var">goL</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681140983"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681140983"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span id="local-6989586621681140982"><span class="annot"><span class="annottext">StmtLR GhcTc GhcTc (LHsExpr GhcTc)
</span><a href="#local-6989586621681140982"><span class="hs-identifier hs-var">stmt</span></a></span></span><span class="hs-special">)</span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621681140981"><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><a href="#local-6989586621681140981"><span class="hs-identifier hs-var">lstmts</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SrcSpan -&gt; DsM CoreExpr -&gt; DsM CoreExpr
forall a. SrcSpan -&gt; DsM a -&gt; DsM a
</span><a href="GHC.HsToCore.Monad.html#putSrcSpanDs"><span class="hs-identifier hs-var">putSrcSpanDs</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681140983"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan
-&gt; StmtLR GhcTc GhcTc (LHsExpr GhcTc)
-&gt; [ExprLStmt GhcTc]
-&gt; DsM CoreExpr
</span><a href="#local-6989586621681140980"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681140983"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">StmtLR GhcTc GhcTc (LHsExpr GhcTc)
</span><a href="#local-6989586621681140982"><span class="hs-identifier hs-var">stmt</span></a></span><span> </span><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><a href="#local-6989586621681140981"><span class="hs-identifier hs-var">lstmts</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1025"></span><span>
</span><span id="line-1026"></span><span>    </span><span id="local-6989586621681140980"><span class="annot"><span class="annottext">go :: SrcSpan
-&gt; StmtLR GhcTc GhcTc (LHsExpr GhcTc)
-&gt; [ExprLStmt GhcTc]
-&gt; DsM CoreExpr
</span><a href="#local-6989586621681140980"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#LastStmt"><span class="hs-identifier hs-type">LastStmt</span></a></span><span> </span><span class="annot"><span class="annottext">XLastStmt GhcTc GhcTc (LHsExpr GhcTc)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681140978"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140978"><span class="hs-identifier hs-var">body</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">SyntaxExpr GhcTc
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681140977"><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><a href="#local-6989586621681140977"><span class="hs-identifier hs-var">stmts</span></a></span></span><span>
</span><span id="line-1027"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">null</span><span> </span><span class="hs-identifier">stmts</span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-identifier">dsLExpr</span><span> </span><span class="hs-identifier">body</span><span>
</span><span id="line-1028"></span><span>        </span><span class="hs-comment">-- The 'return' op isn't used for 'do' expressions</span><span>
</span><span id="line-1029"></span><span>
</span><span id="line-1030"></span><span>    </span><span class="annot"><a href="#local-6989586621681140980"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#BodyStmt"><span class="hs-identifier hs-type">BodyStmt</span></a></span><span> </span><span class="annot"><span class="annottext">XBodyStmt GhcTc GhcTc (LHsExpr GhcTc)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681140975"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140975"><span class="hs-identifier hs-var">rhs</span></a></span></span><span> </span><span id="local-6989586621681140974"><span class="annot"><span class="annottext">SyntaxExpr GhcTc
</span><a href="#local-6989586621681140974"><span class="hs-identifier hs-var">then_expr</span></a></span></span><span> </span><span class="annot"><span class="annottext">SyntaxExpr GhcTc
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681140973"><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><a href="#local-6989586621681140973"><span class="hs-identifier hs-var">stmts</span></a></span></span><span>
</span><span id="line-1031"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681140972"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140972"><span class="hs-identifier hs-var">rhs2</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier hs-var">dsLExpr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140975"><span class="hs-identifier hs-var">rhs</span></a></span><span>
</span><span id="line-1032"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; Type -&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
</span><a href="GHC.HsToCore.Expr.html#warnDiscardedDoBindings"><span class="hs-identifier hs-var">warnDiscardedDoBindings</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140975"><span class="hs-identifier hs-var">rhs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreExpr -&gt; Type
</span><a href="GHC.Core.Utils.html#exprType"><span class="hs-identifier hs-var">exprType</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140972"><span class="hs-identifier hs-var">rhs2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1033"></span><span>           </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681140970"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140970"><span class="hs-identifier hs-var">rest</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[ExprLStmt GhcTc] -&gt; DsM CoreExpr
</span><a href="#local-6989586621681140984"><span class="hs-identifier hs-var">goL</span></a></span><span> </span><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><a href="#local-6989586621681140973"><span class="hs-identifier hs-var">stmts</span></a></span><span>
</span><span id="line-1034"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">SyntaxExpr GhcTc -&gt; [CoreExpr] -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsSyntaxExpr"><span class="hs-identifier hs-var">dsSyntaxExpr</span></a></span><span> </span><span class="annot"><span class="annottext">SyntaxExpr GhcTc
</span><a href="#local-6989586621681140974"><span class="hs-identifier hs-var">then_expr</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140972"><span class="hs-identifier hs-var">rhs2</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140970"><span class="hs-identifier hs-var">rest</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1035"></span><span>
</span><span id="line-1036"></span><span>    </span><span class="annot"><a href="#local-6989586621681140980"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#LetStmt"><span class="hs-identifier hs-type">LetStmt</span></a></span><span> </span><span class="annot"><span class="annottext">XLetStmt GhcTc GhcTc (LHsExpr GhcTc)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681140968"><span class="annot"><span class="annottext">LHsLocalBinds GhcTc
</span><a href="#local-6989586621681140968"><span class="hs-identifier hs-var">binds</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681140967"><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><a href="#local-6989586621681140967"><span class="hs-identifier hs-var">stmts</span></a></span></span><span>
</span><span id="line-1037"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681140966"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140966"><span class="hs-identifier hs-var">rest</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[ExprLStmt GhcTc] -&gt; DsM CoreExpr
</span><a href="#local-6989586621681140984"><span class="hs-identifier hs-var">goL</span></a></span><span> </span><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><a href="#local-6989586621681140967"><span class="hs-identifier hs-var">stmts</span></a></span><span>
</span><span id="line-1038"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">LHsLocalBinds GhcTc -&gt; CoreExpr -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLocalBinds"><span class="hs-identifier hs-var">dsLocalBinds</span></a></span><span> </span><span class="annot"><span class="annottext">LHsLocalBinds GhcTc
</span><a href="#local-6989586621681140968"><span class="hs-identifier hs-var">binds</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140966"><span class="hs-identifier hs-var">rest</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1039"></span><span>
</span><span id="line-1040"></span><span>    </span><span class="annot"><a href="#local-6989586621681140980"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#BindStmt"><span class="hs-identifier hs-type">BindStmt</span></a></span><span> </span><span id="local-6989586621681140964"><span class="annot"><span class="annottext">XBindStmt GhcTc GhcTc (LHsExpr GhcTc)
</span><a href="#local-6989586621681140964"><span class="hs-identifier hs-var">xbs</span></a></span></span><span> </span><span id="local-6989586621681140963"><span class="annot"><span class="annottext">LPat GhcTc
</span><a href="#local-6989586621681140963"><span class="hs-identifier hs-var">pat</span></a></span></span><span> </span><span id="local-6989586621681140962"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140962"><span class="hs-identifier hs-var">rhs</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681140961"><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><a href="#local-6989586621681140961"><span class="hs-identifier hs-var">stmts</span></a></span></span><span>
</span><span id="line-1041"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>  </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681140960"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140960"><span class="hs-identifier hs-var">body</span></a></span></span><span>     </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[ExprLStmt GhcTc] -&gt; DsM CoreExpr
</span><a href="#local-6989586621681140984"><span class="hs-identifier hs-var">goL</span></a></span><span> </span><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><a href="#local-6989586621681140961"><span class="hs-identifier hs-var">stmts</span></a></span><span>
</span><span id="line-1042"></span><span>            </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681140959"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140959"><span class="hs-identifier hs-var">rhs'</span></a></span></span><span>     </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier hs-var">dsLExpr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140962"><span class="hs-identifier hs-var">rhs</span></a></span><span>
</span><span id="line-1043"></span><span>            </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681140958"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681140958"><span class="hs-identifier hs-var">var</span></a></span></span><span>   </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Type -&gt; LPat GhcTc -&gt; DsM Id
</span><a href="GHC.HsToCore.Utils.html#selectSimpleMatchVarL"><span class="hs-identifier hs-var">selectSimpleMatchVarL</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XBindStmtTc -&gt; Type
</span><a href="GHC.Hs.Expr.html#xbstc_boundResultMult"><span class="hs-identifier hs-var hs-var">xbstc_boundResultMult</span></a></span><span> </span><span class="annot"><span class="annottext">XBindStmt GhcTc GhcTc (LHsExpr GhcTc)
XBindStmtTc
</span><a href="#local-6989586621681140964"><span class="hs-identifier hs-var">xbs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">LPat GhcTc
</span><a href="#local-6989586621681140963"><span class="hs-identifier hs-var">pat</span></a></span><span>
</span><span id="line-1044"></span><span>            </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681140955"><span class="annot"><span class="annottext">MatchResult CoreExpr
</span><a href="#local-6989586621681140955"><span class="hs-identifier hs-var">match</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Id
-&gt; HsMatchContext GhcRn
-&gt; LPat GhcTc
-&gt; Type
-&gt; MatchResult CoreExpr
-&gt; DsM (MatchResult CoreExpr)
</span><a href="GHC.HsToCore.Match.html#matchSinglePatVar"><span class="hs-identifier hs-var">matchSinglePatVar</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681140958"><span class="hs-identifier hs-var">var</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsStmtContext GhcRn -&gt; HsMatchContext GhcRn
forall p. HsStmtContext p -&gt; HsMatchContext p
</span><a href="GHC.Hs.Expr.html#StmtCtxt"><span class="hs-identifier hs-var">StmtCtxt</span></a></span><span> </span><span class="annot"><span class="annottext">HsStmtContext GhcRn
</span><a href="#local-6989586621681140986"><span class="hs-identifier hs-var">ctx</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">LPat GhcTc
</span><a href="#local-6989586621681140963"><span class="hs-identifier hs-var">pat</span></a></span><span>
</span><span id="line-1045"></span><span>                         </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XBindStmtTc -&gt; Type
</span><a href="GHC.Hs.Expr.html#xbstc_boundResultType"><span class="hs-identifier hs-var hs-var">xbstc_boundResultType</span></a></span><span> </span><span class="annot"><span class="annottext">XBindStmt GhcTc GhcTc (LHsExpr GhcTc)
XBindStmtTc
</span><a href="#local-6989586621681140964"><span class="hs-identifier hs-var">xbs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreExpr -&gt; MatchResult CoreExpr
</span><a href="GHC.HsToCore.Utils.html#cantFailMatchResult"><span class="hs-identifier hs-var">cantFailMatchResult</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140960"><span class="hs-identifier hs-var">body</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1046"></span><span>            </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681140951"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140951"><span class="hs-identifier hs-var">match_code</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LPat GhcTc
-&gt; MatchResult CoreExpr -&gt; Maybe (SyntaxExpr GhcTc) -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsHandleMonadicFailure"><span class="hs-identifier hs-var">dsHandleMonadicFailure</span></a></span><span> </span><span class="annot"><span class="annottext">LPat GhcTc
</span><a href="#local-6989586621681140963"><span class="hs-identifier hs-var">pat</span></a></span><span> </span><span class="annot"><span class="annottext">MatchResult CoreExpr
</span><a href="#local-6989586621681140955"><span class="hs-identifier hs-var">match</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XBindStmtTc -&gt; Maybe (SyntaxExpr GhcTc)
</span><a href="GHC.Hs.Expr.html#xbstc_failOp"><span class="hs-identifier hs-var hs-var">xbstc_failOp</span></a></span><span> </span><span class="annot"><span class="annottext">XBindStmt GhcTc GhcTc (LHsExpr GhcTc)
XBindStmtTc
</span><a href="#local-6989586621681140964"><span class="hs-identifier hs-var">xbs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1047"></span><span>            </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">SyntaxExpr GhcTc -&gt; [CoreExpr] -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsSyntaxExpr"><span class="hs-identifier hs-var">dsSyntaxExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XBindStmtTc -&gt; SyntaxExpr GhcTc
</span><a href="GHC.Hs.Expr.html#xbstc_bindOp"><span class="hs-identifier hs-var hs-var">xbstc_bindOp</span></a></span><span> </span><span class="annot"><span class="annottext">XBindStmt GhcTc GhcTc (LHsExpr GhcTc)
XBindStmtTc
</span><a href="#local-6989586621681140964"><span class="hs-identifier hs-var">xbs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140959"><span class="hs-identifier hs-var">rhs'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Id -&gt; CoreExpr -&gt; CoreExpr
forall b. b -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#Lam"><span class="hs-identifier hs-var">Lam</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681140958"><span class="hs-identifier hs-var">var</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140951"><span class="hs-identifier hs-var">match_code</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1048"></span><span>
</span><span id="line-1049"></span><span>    </span><span class="annot"><a href="#local-6989586621681140980"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#ApplicativeStmt"><span class="hs-identifier hs-type">ApplicativeStmt</span></a></span><span> </span><span id="local-6989586621681140947"><span class="annot"><span class="annottext">XApplicativeStmt GhcTc GhcTc (LHsExpr GhcTc)
</span><a href="#local-6989586621681140947"><span class="hs-identifier hs-var">body_ty</span></a></span></span><span> </span><span id="local-6989586621681140946"><span class="annot"><span class="annottext">[(SyntaxExpr GhcTc, ApplicativeArg GhcTc)]
</span><a href="#local-6989586621681140946"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span id="local-6989586621681140945"><span class="annot"><span class="annottext">Maybe (SyntaxExpr GhcTc)
</span><a href="#local-6989586621681140945"><span class="hs-identifier hs-var">mb_join</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681140944"><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><a href="#local-6989586621681140944"><span class="hs-identifier hs-var">stmts</span></a></span></span><span>
</span><span id="line-1050"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-1051"></span><span>             </span><span class="hs-keyword">let</span><span>
</span><span id="line-1052"></span><span>               </span><span class="hs-special">(</span><span id="local-6989586621681140943"><span class="annot"><span class="annottext">[(Located (Pat GhcTc), Maybe SyntaxExprTc)]
</span><a href="#local-6989586621681140943"><span class="hs-identifier hs-var">pats</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681140942"><span class="annot"><span class="annottext">[DsM CoreExpr]
</span><a href="#local-6989586621681140942"><span class="hs-identifier hs-var">rhss</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[((Located (Pat GhcTc), Maybe SyntaxExprTc), DsM CoreExpr)]
-&gt; ([(Located (Pat GhcTc), Maybe SyntaxExprTc)], [DsM CoreExpr])
forall a b. [(a, b)] -&gt; ([a], [b])
</span><a href="../../base/src/GHC.List.html#unzip"><span class="hs-identifier hs-var">unzip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((SyntaxExprTc, ApplicativeArg GhcTc)
 -&gt; ((Located (Pat GhcTc), Maybe SyntaxExprTc), DsM CoreExpr))
-&gt; [(SyntaxExprTc, ApplicativeArg GhcTc)]
-&gt; [((Located (Pat GhcTc), Maybe SyntaxExprTc), DsM CoreExpr)]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ApplicativeArg GhcTc
-&gt; ((Located (Pat GhcTc), Maybe SyntaxExprTc), DsM CoreExpr)
</span><a href="#local-6989586621681140940"><span class="hs-identifier hs-var">do_arg</span></a></span><span> </span><span class="annot"><span class="annottext">(ApplicativeArg GhcTc
 -&gt; ((Located (Pat GhcTc), Maybe SyntaxExprTc), DsM CoreExpr))
-&gt; ((SyntaxExprTc, ApplicativeArg GhcTc) -&gt; ApplicativeArg GhcTc)
-&gt; (SyntaxExprTc, ApplicativeArg GhcTc)
-&gt; ((Located (Pat GhcTc), Maybe SyntaxExprTc), DsM CoreExpr)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(SyntaxExprTc, ApplicativeArg GhcTc) -&gt; ApplicativeArg GhcTc
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[(SyntaxExpr GhcTc, ApplicativeArg GhcTc)]
[(SyntaxExprTc, ApplicativeArg GhcTc)]
</span><a href="#local-6989586621681140946"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1053"></span><span>
</span><span id="line-1054"></span><span>               </span><span id="local-6989586621681140940"><span class="annot"><span class="annottext">do_arg :: ApplicativeArg GhcTc
-&gt; ((Located (Pat GhcTc), Maybe SyntaxExprTc), DsM CoreExpr)
</span><a href="#local-6989586621681140940"><span class="hs-identifier hs-var hs-var">do_arg</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#ApplicativeArgOne"><span class="hs-identifier hs-type">ApplicativeArgOne</span></a></span><span> </span><span id="local-6989586621681140938"><span class="annot"><span class="annottext">XApplicativeArgOne GhcTc
</span><a href="#local-6989586621681140938"><span class="hs-identifier hs-var">fail_op</span></a></span></span><span> </span><span id="local-6989586621681140937"><span class="annot"><span class="annottext">LPat GhcTc
</span><a href="#local-6989586621681140937"><span class="hs-identifier hs-var">pat</span></a></span></span><span> </span><span id="local-6989586621681140936"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140936"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1055"></span><span>                 </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Located (Pat GhcTc)
LPat GhcTc
</span><a href="#local-6989586621681140937"><span class="hs-identifier hs-var">pat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe SyntaxExprTc
XApplicativeArgOne GhcTc
</span><a href="#local-6989586621681140938"><span class="hs-identifier hs-var">fail_op</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier hs-var">dsLExpr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140936"><span class="hs-identifier hs-var">expr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1056"></span><span>               </span><span class="annot"><a href="#local-6989586621681140940"><span class="hs-identifier hs-var">do_arg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#ApplicativeArgMany"><span class="hs-identifier hs-type">ApplicativeArgMany</span></a></span><span> </span><span class="annot"><span class="annottext">XApplicativeArgMany GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681140934"><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><a href="#local-6989586621681140934"><span class="hs-identifier hs-var">stmts</span></a></span></span><span> </span><span id="local-6989586621681140933"><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681140933"><span class="hs-identifier hs-var">ret</span></a></span></span><span> </span><span id="local-6989586621681140932"><span class="annot"><span class="annottext">LPat GhcTc
</span><a href="#local-6989586621681140932"><span class="hs-identifier hs-var">pat</span></a></span></span><span> </span><span class="annot"><span class="annottext">HsStmtContext GhcRn
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1057"></span><span>                 </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Located (Pat GhcTc)
LPat GhcTc
</span><a href="#local-6989586621681140932"><span class="hs-identifier hs-var">pat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe SyntaxExprTc
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">HsStmtContext GhcRn -&gt; [ExprLStmt GhcTc] -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsDo"><span class="hs-identifier hs-var">dsDo</span></a></span><span> </span><span class="annot"><span class="annottext">HsStmtContext GhcRn
</span><a href="#local-6989586621681140986"><span class="hs-identifier hs-var">ctx</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><a href="#local-6989586621681140934"><span class="hs-identifier hs-var">stmts</span></a></span><span> </span><span class="annot"><span class="annottext">[ExprLStmt GhcTc] -&gt; [ExprLStmt GhcTc] -&gt; [ExprLStmt GhcTc]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">StmtLR GhcTc GhcTc (LHsExpr GhcTc) -&gt; ExprLStmt GhcTc
forall e. e -&gt; Located e
</span><a href="GHC.Types.SrcLoc.html#noLoc"><span class="hs-identifier hs-var">noLoc</span></a></span><span> </span><span class="annot"><span class="annottext">(StmtLR GhcTc GhcTc (LHsExpr GhcTc) -&gt; ExprLStmt GhcTc)
-&gt; StmtLR GhcTc GhcTc (LHsExpr GhcTc) -&gt; ExprLStmt GhcTc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; StmtLR GhcTc GhcTc (LHsExpr GhcTc)
forall (idR :: Pass) (bodyR :: * -&gt; *) (idL :: Pass).
IsPass idR =&gt;
Located (bodyR (GhcPass idR))
-&gt; StmtLR
     (GhcPass idL) (GhcPass idR) (Located (bodyR (GhcPass idR)))
</span><a href="GHC.Hs.Utils.html#mkLastStmt"><span class="hs-identifier hs-var">mkLastStmt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsExpr GhcTc -&gt; LHsExpr GhcTc
forall e. e -&gt; Located e
</span><a href="GHC.Types.SrcLoc.html#noLoc"><span class="hs-identifier hs-var">noLoc</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681140933"><span class="hs-identifier hs-var">ret</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1058"></span><span>
</span><span id="line-1059"></span><span>           </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681140930"><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621681140930"><span class="hs-identifier hs-var">rhss'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[DsM CoreExpr] -&gt; DsM [CoreExpr]
forall (t :: * -&gt; *) (m :: * -&gt; *) a.
(Traversable t, Monad m) =&gt;
t (m a) -&gt; m (t a)
</span><a href="../../base/src/Data.Traversable.html#sequence"><span class="hs-identifier hs-var">sequence</span></a></span><span> </span><span class="annot"><span class="annottext">[DsM CoreExpr]
</span><a href="#local-6989586621681140942"><span class="hs-identifier hs-var">rhss</span></a></span><span>
</span><span id="line-1060"></span><span>
</span><span id="line-1061"></span><span>           </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681140928"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140928"><span class="hs-identifier hs-var">body'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsLExpr"><span class="hs-identifier hs-var">dsLExpr</span></a></span><span> </span><span class="annot"><span class="annottext">(LHsExpr GhcTc -&gt; DsM CoreExpr) -&gt; LHsExpr GhcTc -&gt; DsM CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc -&gt; LHsExpr GhcTc
forall e. e -&gt; Located e
</span><a href="GHC.Types.SrcLoc.html#noLoc"><span class="hs-identifier hs-var">noLoc</span></a></span><span> </span><span class="annot"><span class="annottext">(HsExpr GhcTc -&gt; LHsExpr GhcTc) -&gt; HsExpr GhcTc -&gt; LHsExpr GhcTc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">XDo GhcTc
-&gt; HsStmtContext GhcRn
-&gt; GenLocated SrcSpan [ExprLStmt GhcTc]
-&gt; HsExpr GhcTc
forall p.
XDo p -&gt; HsStmtContext GhcRn -&gt; Located [ExprLStmt p] -&gt; HsExpr p
</span><a href="GHC.Hs.Expr.html#HsDo"><span class="hs-identifier hs-var">HsDo</span></a></span><span> </span><span class="annot"><span class="annottext">XApplicativeStmt GhcTc GhcTc (LHsExpr GhcTc)
XDo GhcTc
</span><a href="#local-6989586621681140947"><span class="hs-identifier hs-var">body_ty</span></a></span><span> </span><span class="annot"><span class="annottext">HsStmtContext GhcRn
</span><a href="#local-6989586621681140986"><span class="hs-identifier hs-var">ctx</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[ExprLStmt GhcTc] -&gt; GenLocated SrcSpan [ExprLStmt GhcTc]
forall e. e -&gt; Located e
</span><a href="GHC.Types.SrcLoc.html#noLoc"><span class="hs-identifier hs-var">noLoc</span></a></span><span> </span><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><a href="#local-6989586621681140944"><span class="hs-identifier hs-var">stmts</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1062"></span><span>
</span><span id="line-1063"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681140927"><span class="annot"><span class="annottext">match_args :: (Located (Pat GhcTc), Maybe SyntaxExprTc)
-&gt; ([Id], CoreExpr) -&gt; DsM ([Id], CoreExpr)
</span><a href="#local-6989586621681140927"><span class="hs-identifier hs-var hs-var">match_args</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681140926"><span class="annot"><span class="annottext">Located (Pat GhcTc)
</span><a href="#local-6989586621681140926"><span class="hs-identifier hs-var">pat</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681140925"><span class="annot"><span class="annottext">Maybe SyntaxExprTc
</span><a href="#local-6989586621681140925"><span class="hs-identifier hs-var">fail_op</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681140924"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681140924"><span class="hs-identifier hs-var">vs</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681140923"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140923"><span class="hs-identifier hs-var">body</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-1064"></span><span>                   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681140922"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681140922"><span class="hs-identifier hs-var">var</span></a></span></span><span>   </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Type -&gt; LPat GhcTc -&gt; DsM Id
</span><a href="GHC.HsToCore.Utils.html#selectSimpleMatchVarL"><span class="hs-identifier hs-var">selectSimpleMatchVarL</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Core.Type.html#Many"><span class="hs-identifier hs-var">Many</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Pat GhcTc)
LPat GhcTc
</span><a href="#local-6989586621681140926"><span class="hs-identifier hs-var">pat</span></a></span><span>
</span><span id="line-1065"></span><span>                        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681140921"><span class="annot"><span class="annottext">MatchResult CoreExpr
</span><a href="#local-6989586621681140921"><span class="hs-identifier hs-var">match</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Id
-&gt; HsMatchContext GhcRn
-&gt; LPat GhcTc
-&gt; Type
-&gt; MatchResult CoreExpr
-&gt; DsM (MatchResult CoreExpr)
</span><a href="GHC.HsToCore.Match.html#matchSinglePatVar"><span class="hs-identifier hs-var">matchSinglePatVar</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681140922"><span class="hs-identifier hs-var">var</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsStmtContext GhcRn -&gt; HsMatchContext GhcRn
forall p. HsStmtContext p -&gt; HsMatchContext p
</span><a href="GHC.Hs.Expr.html#StmtCtxt"><span class="hs-identifier hs-var">StmtCtxt</span></a></span><span> </span><span class="annot"><span class="annottext">HsStmtContext GhcRn
</span><a href="#local-6989586621681140986"><span class="hs-identifier hs-var">ctx</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Located (Pat GhcTc)
LPat GhcTc
</span><a href="#local-6989586621681140926"><span class="hs-identifier hs-var">pat</span></a></span><span>
</span><span id="line-1066"></span><span>                                   </span><span class="annot"><span class="annottext">Type
XApplicativeStmt GhcTc GhcTc (LHsExpr GhcTc)
</span><a href="#local-6989586621681140947"><span class="hs-identifier hs-var">body_ty</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreExpr -&gt; MatchResult CoreExpr
</span><a href="GHC.HsToCore.Utils.html#cantFailMatchResult"><span class="hs-identifier hs-var">cantFailMatchResult</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140923"><span class="hs-identifier hs-var">body</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1067"></span><span>                        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681140920"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140920"><span class="hs-identifier hs-var">match_code</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LPat GhcTc
-&gt; MatchResult CoreExpr -&gt; Maybe (SyntaxExpr GhcTc) -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsHandleMonadicFailure"><span class="hs-identifier hs-var">dsHandleMonadicFailure</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Pat GhcTc)
LPat GhcTc
</span><a href="#local-6989586621681140926"><span class="hs-identifier hs-var">pat</span></a></span><span> </span><span class="annot"><span class="annottext">MatchResult CoreExpr
</span><a href="#local-6989586621681140921"><span class="hs-identifier hs-var">match</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (SyntaxExpr GhcTc)
Maybe SyntaxExprTc
</span><a href="#local-6989586621681140925"><span class="hs-identifier hs-var">fail_op</span></a></span><span>
</span><span id="line-1068"></span><span>                        </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">([Id], CoreExpr) -&gt; DsM ([Id], CoreExpr)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681140922"><span class="hs-identifier hs-var">var</span></a></span><span class="annot"><span class="annottext">Id -&gt; [Id] -&gt; [Id]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681140924"><span class="hs-identifier hs-var">vs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140920"><span class="hs-identifier hs-var">match_code</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1069"></span><span>                        </span><span class="hs-special">}</span><span>
</span><span id="line-1070"></span><span>
</span><span id="line-1071"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681140919"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681140919"><span class="hs-identifier hs-var">vars</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681140918"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140918"><span class="hs-identifier hs-var">body</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">((Located (Pat GhcTc), Maybe SyntaxExprTc)
 -&gt; ([Id], CoreExpr) -&gt; DsM ([Id], CoreExpr))
-&gt; ([Id], CoreExpr)
-&gt; [(Located (Pat GhcTc), Maybe SyntaxExprTc)]
-&gt; DsM ([Id], CoreExpr)
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Foldable t, Monad m) =&gt;
(a -&gt; b -&gt; m b) -&gt; b -&gt; t a -&gt; m b
</span><a href="../../base/src/Data.Foldable.html#foldrM"><span class="hs-identifier hs-var">foldrM</span></a></span><span> </span><span class="annot"><span class="annottext">(Located (Pat GhcTc), Maybe SyntaxExprTc)
-&gt; ([Id], CoreExpr) -&gt; DsM ([Id], CoreExpr)
</span><a href="#local-6989586621681140927"><span class="hs-identifier hs-var">match_args</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140928"><span class="hs-identifier hs-var">body'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[(Located (Pat GhcTc), Maybe SyntaxExprTc)]
</span><a href="#local-6989586621681140943"><span class="hs-identifier hs-var">pats</span></a></span><span>
</span><span id="line-1072"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681140917"><span class="annot"><span class="annottext">fun' :: CoreExpr
</span><a href="#local-6989586621681140917"><span class="hs-identifier hs-var hs-var">fun'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Id] -&gt; CoreExpr -&gt; CoreExpr
forall b. [b] -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#mkLams"><span class="hs-identifier hs-var">mkLams</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681140919"><span class="hs-identifier hs-var">vars</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140918"><span class="hs-identifier hs-var">body</span></a></span><span>
</span><span id="line-1073"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681140916"><span class="annot"><span class="annottext">mk_ap_call :: CoreExpr -&gt; (SyntaxExprTc, CoreExpr) -&gt; DsM CoreExpr
</span><a href="#local-6989586621681140916"><span class="hs-identifier hs-var hs-var">mk_ap_call</span></a></span></span><span> </span><span id="local-6989586621681140915"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140915"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681140914"><span class="annot"><span class="annottext">SyntaxExprTc
</span><a href="#local-6989586621681140914"><span class="hs-identifier hs-var">op</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681140913"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140913"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SyntaxExpr GhcTc -&gt; [CoreExpr] -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsSyntaxExpr"><span class="hs-identifier hs-var">dsSyntaxExpr</span></a></span><span> </span><span class="annot"><span class="annottext">SyntaxExpr GhcTc
SyntaxExprTc
</span><a href="#local-6989586621681140914"><span class="hs-identifier hs-var">op</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140915"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140913"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1074"></span><span>           </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681140912"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140912"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; (SyntaxExprTc, CoreExpr) -&gt; DsM CoreExpr)
-&gt; CoreExpr -&gt; [(SyntaxExprTc, CoreExpr)] -&gt; DsM CoreExpr
forall (t :: * -&gt; *) (m :: * -&gt; *) b a.
(Foldable t, Monad m) =&gt;
(b -&gt; a -&gt; m b) -&gt; b -&gt; t a -&gt; m b
</span><a href="../../base/src/Data.Foldable.html#foldlM"><span class="hs-identifier hs-var">foldlM</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; (SyntaxExprTc, CoreExpr) -&gt; DsM CoreExpr
</span><a href="#local-6989586621681140916"><span class="hs-identifier hs-var">mk_ap_call</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140917"><span class="hs-identifier hs-var">fun'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SyntaxExprTc] -&gt; [CoreExpr] -&gt; [(SyntaxExprTc, CoreExpr)]
forall a b. [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="../../base/src/GHC.List.html#zip"><span class="hs-identifier hs-var">zip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((SyntaxExprTc, ApplicativeArg GhcTc) -&gt; SyntaxExprTc)
-&gt; [(SyntaxExprTc, ApplicativeArg GhcTc)] -&gt; [SyntaxExprTc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(SyntaxExprTc, ApplicativeArg GhcTc) -&gt; SyntaxExprTc
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span> </span><span class="annot"><span class="annottext">[(SyntaxExpr GhcTc, ApplicativeArg GhcTc)]
[(SyntaxExprTc, ApplicativeArg GhcTc)]
</span><a href="#local-6989586621681140946"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621681140930"><span class="hs-identifier hs-var">rhss'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1075"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe (SyntaxExpr GhcTc)
</span><a href="#local-6989586621681140945"><span class="hs-identifier hs-var">mb_join</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1076"></span><span>               </span><span class="annot"><span class="annottext">Maybe (SyntaxExpr GhcTc)
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; DsM CoreExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140912"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-1077"></span><span>               </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681140911"><span class="annot"><span class="annottext">SyntaxExpr GhcTc
</span><a href="#local-6989586621681140911"><span class="hs-identifier hs-var">join_op</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SyntaxExpr GhcTc -&gt; [CoreExpr] -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsSyntaxExpr"><span class="hs-identifier hs-var">dsSyntaxExpr</span></a></span><span> </span><span class="annot"><span class="annottext">SyntaxExpr GhcTc
</span><a href="#local-6989586621681140911"><span class="hs-identifier hs-var">join_op</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140912"><span class="hs-identifier hs-var">expr</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1078"></span><span>
</span><span id="line-1079"></span><span>    </span><span class="annot"><a href="#local-6989586621681140980"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621681140910"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681140910"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#RecStmt"><span class="hs-identifier hs-type">RecStmt</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">recS_stmts :: forall idL idR body. StmtLR idL idR body -&gt; [LStmtLR idL idR body]
</span><a href="GHC.Hs.Expr.html#recS_stmts"><span class="hs-identifier hs-var">recS_stmts</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681140907"><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><a href="#local-6989586621681140907"><span class="hs-identifier hs-var">rec_stmts</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">recS_later_ids :: forall idL idR body. StmtLR idL idR body -&gt; [IdP idR]
</span><a href="GHC.Hs.Expr.html#recS_later_ids"><span class="hs-identifier hs-var">recS_later_ids</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681140905"><span class="annot"><span class="annottext">[IdP GhcTc]
</span><a href="#local-6989586621681140905"><span class="hs-identifier hs-var">later_ids</span></a></span></span><span>
</span><span id="line-1080"></span><span>                    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">recS_rec_ids :: forall idL idR body. StmtLR idL idR body -&gt; [IdP idR]
</span><a href="GHC.Hs.Expr.html#recS_rec_ids"><span class="hs-identifier hs-var">recS_rec_ids</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681140903"><span class="annot"><span class="annottext">[IdP GhcTc]
</span><a href="#local-6989586621681140903"><span class="hs-identifier hs-var">rec_ids</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">recS_ret_fn :: forall idL idR body. StmtLR idL idR body -&gt; SyntaxExpr idR
</span><a href="GHC.Hs.Expr.html#recS_ret_fn"><span class="hs-identifier hs-var">recS_ret_fn</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681140901"><span class="annot"><span class="annottext">SyntaxExpr GhcTc
</span><a href="#local-6989586621681140901"><span class="hs-identifier hs-var">return_op</span></a></span></span><span>
</span><span id="line-1081"></span><span>                    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">recS_mfix_fn :: forall idL idR body. StmtLR idL idR body -&gt; SyntaxExpr idR
</span><a href="GHC.Hs.Expr.html#recS_mfix_fn"><span class="hs-identifier hs-var">recS_mfix_fn</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681140899"><span class="annot"><span class="annottext">SyntaxExpr GhcTc
</span><a href="#local-6989586621681140899"><span class="hs-identifier hs-var">mfix_op</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">recS_bind_fn :: forall idL idR body. StmtLR idL idR body -&gt; SyntaxExpr idR
</span><a href="GHC.Hs.Expr.html#recS_bind_fn"><span class="hs-identifier hs-var">recS_bind_fn</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681140897"><span class="annot"><span class="annottext">SyntaxExpr GhcTc
</span><a href="#local-6989586621681140897"><span class="hs-identifier hs-var">bind_op</span></a></span></span><span>
</span><span id="line-1082"></span><span>                    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">recS_ext :: forall idL idR body. StmtLR idL idR body -&gt; XRecStmt idL idR body
</span><a href="GHC.Hs.Expr.html#recS_ext"><span class="hs-identifier hs-var">recS_ext</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#RecStmtTc"><span class="hs-identifier hs-type">RecStmtTc</span></a></span><span>
</span><span id="line-1083"></span><span>                        </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">recS_bind_ty :: RecStmtTc -&gt; Type
</span><a href="GHC.Hs.Expr.html#recS_bind_ty"><span class="hs-identifier hs-var">recS_bind_ty</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681140893"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681140893"><span class="hs-identifier hs-var">bind_ty</span></a></span></span><span>
</span><span id="line-1084"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">recS_rec_rets :: RecStmtTc -&gt; [HsExpr GhcTc]
</span><a href="GHC.Hs.Expr.html#recS_rec_rets"><span class="hs-identifier hs-var">recS_rec_rets</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681140891"><span class="annot"><span class="annottext">[HsExpr GhcTc]
</span><a href="#local-6989586621681140891"><span class="hs-identifier hs-var">rec_rets</span></a></span></span><span>
</span><span id="line-1085"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">recS_ret_ty :: RecStmtTc -&gt; Type
</span><a href="GHC.Hs.Expr.html#recS_ret_ty"><span class="hs-identifier hs-var">recS_ret_ty</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681140889"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681140889"><span class="hs-identifier hs-var">body_ty</span></a></span></span><span class="hs-special">}</span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span id="local-6989586621681140888"><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><a href="#local-6989586621681140888"><span class="hs-identifier hs-var">stmts</span></a></span></span><span>
</span><span id="line-1086"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ExprLStmt GhcTc] -&gt; DsM CoreExpr
</span><a href="#local-6989586621681140984"><span class="hs-identifier hs-var">goL</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ExprLStmt GhcTc
</span><a href="#local-6989586621681140887"><span class="hs-identifier hs-var">new_bind_stmt</span></a></span><span> </span><span class="annot"><span class="annottext">ExprLStmt GhcTc -&gt; [ExprLStmt GhcTc] -&gt; [ExprLStmt GhcTc]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><a href="#local-6989586621681140888"><span class="hs-identifier hs-var">stmts</span></a></span><span class="hs-special">)</span><span>  </span><span class="hs-comment">-- rec_ids can be empty; eg  rec { print 'x' }</span><span>
</span><span id="line-1087"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-1088"></span><span>        </span><span id="local-6989586621681140887"><span class="annot"><span class="annottext">new_bind_stmt :: ExprLStmt GhcTc
</span><a href="#local-6989586621681140887"><span class="hs-identifier hs-var hs-var">new_bind_stmt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SrcSpan -&gt; StmtLR GhcTc GhcTc (LHsExpr GhcTc) -&gt; ExprLStmt GhcTc
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681140910"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">(StmtLR GhcTc GhcTc (LHsExpr GhcTc) -&gt; ExprLStmt GhcTc)
-&gt; StmtLR GhcTc GhcTc (LHsExpr GhcTc) -&gt; ExprLStmt GhcTc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">XBindStmt GhcTc GhcTc (LHsExpr GhcTc)
-&gt; LPat GhcTc
-&gt; LHsExpr GhcTc
-&gt; StmtLR GhcTc GhcTc (LHsExpr GhcTc)
forall idL idR body.
XBindStmt idL idR body -&gt; LPat idL -&gt; body -&gt; StmtLR idL idR body
</span><a href="GHC.Hs.Expr.html#BindStmt"><span class="hs-identifier hs-var">BindStmt</span></a></span><span>
</span><span id="line-1089"></span><span>          </span><span class="annot"><span class="annottext">XBindStmtTc :: SyntaxExpr GhcTc
-&gt; Type -&gt; Type -&gt; Maybe (SyntaxExpr GhcTc) -&gt; XBindStmtTc
</span><a href="GHC.Hs.Expr.html#XBindStmtTc"><span class="hs-identifier hs-type">XBindStmtTc</span></a></span><span>
</span><span id="line-1090"></span><span>            </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">xbstc_bindOp :: SyntaxExpr GhcTc
</span><a href="GHC.Hs.Expr.html#xbstc_bindOp"><span class="hs-identifier hs-var">xbstc_bindOp</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SyntaxExpr GhcTc
</span><a href="#local-6989586621681140897"><span class="hs-identifier hs-var">bind_op</span></a></span><span>
</span><span id="line-1091"></span><span>            </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">xbstc_boundResultType :: Type
</span><a href="GHC.Hs.Expr.html#xbstc_boundResultType"><span class="hs-identifier hs-var">xbstc_boundResultType</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681140893"><span class="hs-identifier hs-var">bind_ty</span></a></span><span>
</span><span id="line-1092"></span><span>            </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">xbstc_boundResultMult :: Type
</span><a href="GHC.Hs.Expr.html#xbstc_boundResultMult"><span class="hs-identifier hs-var">xbstc_boundResultMult</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Core.Type.html#Many"><span class="hs-identifier hs-var">Many</span></a></span><span>
</span><span id="line-1093"></span><span>            </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">xbstc_failOp :: Maybe (SyntaxExpr GhcTc)
</span><a href="GHC.Hs.Expr.html#xbstc_failOp"><span class="hs-identifier hs-var">xbstc_failOp</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (SyntaxExpr GhcTc)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-comment">-- Tuple cannot fail</span><span>
</span><span id="line-1094"></span><span>            </span><span class="hs-special">}</span><span>
</span><span id="line-1095"></span><span>          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[LPat GhcTc] -&gt; LPat GhcTc
</span><a href="GHC.HsToCore.Utils.html#mkBigLHsPatTupId"><span class="hs-identifier hs-var">mkBigLHsPatTupId</span></a></span><span> </span><span class="annot"><span class="annottext">[Located (Pat GhcTc)]
[LPat GhcTc]
</span><a href="#local-6989586621681140884"><span class="hs-identifier hs-var">later_pats</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1096"></span><span>          </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140883"><span class="hs-identifier hs-var">mfix_app</span></a></span><span>
</span><span id="line-1097"></span><span>
</span><span id="line-1098"></span><span>        </span><span id="local-6989586621681140882"><span class="annot"><span class="annottext">tup_ids :: [Id]
</span><a href="#local-6989586621681140882"><span class="hs-identifier hs-var hs-var">tup_ids</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Id]
[IdP GhcTc]
</span><a href="#local-6989586621681140903"><span class="hs-identifier hs-var">rec_ids</span></a></span><span> </span><span class="annot"><span class="annottext">[Id] -&gt; [Id] -&gt; [Id]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">(Id -&gt; Bool) -&gt; [Id] -&gt; [Id]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="GHC.Utils.Misc.html#filterOut"><span class="hs-identifier hs-var">filterOut</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; [Id] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#elem"><span class="hs-operator hs-var">`elem`</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
[IdP GhcTc]
</span><a href="#local-6989586621681140903"><span class="hs-identifier hs-var">rec_ids</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Id]
[IdP GhcTc]
</span><a href="#local-6989586621681140905"><span class="hs-identifier hs-var">later_ids</span></a></span><span>
</span><span id="line-1099"></span><span>        </span><span id="local-6989586621681140879"><span class="annot"><span class="annottext">tup_ty :: Type
</span><a href="#local-6989586621681140879"><span class="hs-identifier hs-var hs-var">tup_ty</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Type] -&gt; Type
</span><a href="GHC.Core.Make.html#mkBigCoreTupTy"><span class="hs-identifier hs-var">mkBigCoreTupTy</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Id -&gt; Type) -&gt; [Id] -&gt; [Type]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Type
</span><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-var">idType</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681140882"><span class="hs-identifier hs-var">tup_ids</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- Deals with singleton case</span><span>
</span><span id="line-1100"></span><span>        </span><span id="local-6989586621681140877"><span class="annot"><span class="annottext">rec_tup_pats :: [Located (Pat GhcTc)]
</span><a href="#local-6989586621681140877"><span class="hs-identifier hs-var hs-var">rec_tup_pats</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Id -&gt; Located (Pat GhcTc)) -&gt; [Id] -&gt; [Located (Pat GhcTc)]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Located (Pat GhcTc)
forall (id :: Pass). IdP (GhcPass id) -&gt; LPat (GhcPass id)
</span><a href="GHC.Hs.Utils.html#nlVarPat"><span class="hs-identifier hs-var">nlVarPat</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681140882"><span class="hs-identifier hs-var">tup_ids</span></a></span><span>
</span><span id="line-1101"></span><span>        </span><span id="local-6989586621681140884"><span class="annot"><span class="annottext">later_pats :: [Located (Pat GhcTc)]
</span><a href="#local-6989586621681140884"><span class="hs-identifier hs-var hs-var">later_pats</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Located (Pat GhcTc)]
</span><a href="#local-6989586621681140877"><span class="hs-identifier hs-var">rec_tup_pats</span></a></span><span>
</span><span id="line-1102"></span><span>        </span><span id="local-6989586621681140876"><span class="annot"><span class="annottext">rets :: [LHsExpr GhcTc]
</span><a href="#local-6989586621681140876"><span class="hs-identifier hs-var hs-var">rets</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(HsExpr GhcTc -&gt; LHsExpr GhcTc)
-&gt; [HsExpr GhcTc] -&gt; [LHsExpr GhcTc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc -&gt; LHsExpr GhcTc
forall e. e -&gt; Located e
</span><a href="GHC.Types.SrcLoc.html#noLoc"><span class="hs-identifier hs-var">noLoc</span></a></span><span> </span><span class="annot"><span class="annottext">[HsExpr GhcTc]
</span><a href="#local-6989586621681140891"><span class="hs-identifier hs-var">rec_rets</span></a></span><span>
</span><span id="line-1103"></span><span>        </span><span id="local-6989586621681140883"><span class="annot"><span class="annottext">mfix_app :: LHsExpr GhcTc
</span><a href="#local-6989586621681140883"><span class="hs-identifier hs-var hs-var">mfix_app</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SyntaxExprTc -&gt; [LHsExpr GhcTc] -&gt; LHsExpr GhcTc
</span><a href="GHC.Hs.Utils.html#nlHsSyntaxApps"><span class="hs-identifier hs-var">nlHsSyntaxApps</span></a></span><span> </span><span class="annot"><span class="annottext">SyntaxExpr GhcTc
SyntaxExprTc
</span><a href="#local-6989586621681140899"><span class="hs-identifier hs-var">mfix_op</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140874"><span class="hs-identifier hs-var">mfix_arg</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1104"></span><span>        </span><span id="local-6989586621681140874"><span class="annot"><span class="annottext">mfix_arg :: LHsExpr GhcTc
</span><a href="#local-6989586621681140874"><span class="hs-identifier hs-var hs-var">mfix_arg</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc -&gt; LHsExpr GhcTc
forall e. e -&gt; Located e
</span><a href="GHC.Types.SrcLoc.html#noLoc"><span class="hs-identifier hs-var">noLoc</span></a></span><span> </span><span class="annot"><span class="annottext">(HsExpr GhcTc -&gt; LHsExpr GhcTc) -&gt; HsExpr GhcTc -&gt; LHsExpr GhcTc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">XLam GhcTc -&gt; MatchGroup GhcTc (LHsExpr GhcTc) -&gt; HsExpr GhcTc
forall p. XLam p -&gt; MatchGroup p (LHsExpr p) -&gt; HsExpr p
</span><a href="GHC.Hs.Expr.html#HsLam"><span class="hs-identifier hs-var">HsLam</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XLam GhcTc
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span>
</span><span id="line-1105"></span><span>                           </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MG :: forall p body.
XMG p body
-&gt; Located [LMatch p body] -&gt; Origin -&gt; MatchGroup p body
</span><a href="GHC.Hs.Expr.html#MG"><span class="hs-identifier hs-type">MG</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">mg_alts :: Located [LMatch GhcTc (LHsExpr GhcTc)]
</span><a href="GHC.Hs.Expr.html#mg_alts"><span class="hs-identifier hs-var">mg_alts</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[LMatch GhcTc (LHsExpr GhcTc)]
-&gt; Located [LMatch GhcTc (LHsExpr GhcTc)]
forall e. e -&gt; Located e
</span><a href="GHC.Types.SrcLoc.html#noLoc"><span class="hs-identifier hs-var">noLoc</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">HsMatchContext (NoGhcTc GhcTc)
-&gt; [LPat GhcTc] -&gt; LHsExpr GhcTc -&gt; LMatch GhcTc (LHsExpr GhcTc)
forall (p :: Pass) (body :: * -&gt; *).
HsMatchContext (NoGhcTc (GhcPass p))
-&gt; [LPat (GhcPass p)]
-&gt; Located (body (GhcPass p))
-&gt; LMatch (GhcPass p) (Located (body (GhcPass p)))
</span><a href="GHC.Hs.Utils.html#mkSimpleMatch"><span class="hs-identifier hs-var">mkSimpleMatch</span></a></span><span>
</span><span id="line-1106"></span><span>                                                    </span><span class="annot"><span class="annottext">HsMatchContext (NoGhcTc GhcTc)
forall p. HsMatchContext p
</span><a href="GHC.Hs.Expr.html#LambdaExpr"><span class="hs-identifier hs-var">LambdaExpr</span></a></span><span>
</span><span id="line-1107"></span><span>                                                    </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Located (Pat GhcTc)
LPat GhcTc
</span><a href="#local-6989586621681140873"><span class="hs-identifier hs-var">mfix_pat</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140872"><span class="hs-identifier hs-var">body</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1108"></span><span>                               </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mg_ext :: XMG GhcTc (LHsExpr GhcTc)
</span><a href="GHC.Hs.Expr.html#mg_ext"><span class="hs-identifier hs-var">mg_ext</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Scaled Type] -&gt; Type -&gt; MatchGroupTc
</span><a href="GHC.Hs.Expr.html#MatchGroupTc"><span class="hs-identifier hs-var">MatchGroupTc</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Type -&gt; Scaled Type
forall a. a -&gt; Scaled a
</span><a href="GHC.Core.Type.html#unrestricted"><span class="hs-identifier hs-var">unrestricted</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681140879"><span class="hs-identifier hs-var">tup_ty</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681140889"><span class="hs-identifier hs-var">body_ty</span></a></span><span>
</span><span id="line-1109"></span><span>                               </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mg_origin :: Origin
</span><a href="GHC.Hs.Expr.html#mg_origin"><span class="hs-identifier hs-var">mg_origin</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Origin
</span><a href="GHC.Types.Basic.html#Generated"><span class="hs-identifier hs-var">Generated</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-1110"></span><span>        </span><span id="local-6989586621681140873"><span class="annot"><span class="annottext">mfix_pat :: Located (Pat GhcTc)
</span><a href="#local-6989586621681140873"><span class="hs-identifier hs-var hs-var">mfix_pat</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Pat GhcTc -&gt; Located (Pat GhcTc)
forall e. e -&gt; Located e
</span><a href="GHC.Types.SrcLoc.html#noLoc"><span class="hs-identifier hs-var">noLoc</span></a></span><span> </span><span class="annot"><span class="annottext">(Pat GhcTc -&gt; Located (Pat GhcTc))
-&gt; Pat GhcTc -&gt; Located (Pat GhcTc)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">XLazyPat GhcTc -&gt; LPat GhcTc -&gt; Pat GhcTc
forall p. XLazyPat p -&gt; LPat p -&gt; Pat p
</span><a href="GHC.Hs.Pat.html#LazyPat"><span class="hs-identifier hs-var">LazyPat</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XLazyPat GhcTc
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="annot"><span class="annottext">(LPat GhcTc -&gt; Pat GhcTc) -&gt; LPat GhcTc -&gt; Pat GhcTc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[LPat GhcTc] -&gt; LPat GhcTc
</span><a href="GHC.HsToCore.Utils.html#mkBigLHsPatTupId"><span class="hs-identifier hs-var">mkBigLHsPatTupId</span></a></span><span> </span><span class="annot"><span class="annottext">[Located (Pat GhcTc)]
[LPat GhcTc]
</span><a href="#local-6989586621681140877"><span class="hs-identifier hs-var">rec_tup_pats</span></a></span><span>
</span><span id="line-1111"></span><span>        </span><span id="local-6989586621681140872"><span class="annot"><span class="annottext">body :: LHsExpr GhcTc
</span><a href="#local-6989586621681140872"><span class="hs-identifier hs-var hs-var">body</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc -&gt; LHsExpr GhcTc
forall e. e -&gt; Located e
</span><a href="GHC.Types.SrcLoc.html#noLoc"><span class="hs-identifier hs-var">noLoc</span></a></span><span> </span><span class="annot"><span class="annottext">(HsExpr GhcTc -&gt; LHsExpr GhcTc) -&gt; HsExpr GhcTc -&gt; LHsExpr GhcTc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">XDo GhcTc
-&gt; HsStmtContext GhcRn
-&gt; GenLocated SrcSpan [ExprLStmt GhcTc]
-&gt; HsExpr GhcTc
forall p.
XDo p -&gt; HsStmtContext GhcRn -&gt; Located [ExprLStmt p] -&gt; HsExpr p
</span><a href="GHC.Hs.Expr.html#HsDo"><span class="hs-identifier hs-var">HsDo</span></a></span><span> </span><span class="annot"><span class="annottext">Type
XDo GhcTc
</span><a href="#local-6989586621681140889"><span class="hs-identifier hs-var">body_ty</span></a></span><span>
</span><span id="line-1112"></span><span>                                </span><span class="annot"><span class="annottext">HsStmtContext GhcRn
</span><a href="#local-6989586621681140986"><span class="hs-identifier hs-var">ctx</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[ExprLStmt GhcTc] -&gt; GenLocated SrcSpan [ExprLStmt GhcTc]
forall e. e -&gt; Located e
</span><a href="GHC.Types.SrcLoc.html#noLoc"><span class="hs-identifier hs-var">noLoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><a href="#local-6989586621681140907"><span class="hs-identifier hs-var">rec_stmts</span></a></span><span> </span><span class="annot"><span class="annottext">[ExprLStmt GhcTc] -&gt; [ExprLStmt GhcTc] -&gt; [ExprLStmt GhcTc]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">ExprLStmt GhcTc
</span><a href="#local-6989586621681140869"><span class="hs-identifier hs-var">ret_stmt</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1113"></span><span>        </span><span id="local-6989586621681140868"><span class="annot"><span class="annottext">ret_app :: LHsExpr GhcTc
</span><a href="#local-6989586621681140868"><span class="hs-identifier hs-var hs-var">ret_app</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SyntaxExprTc -&gt; [LHsExpr GhcTc] -&gt; LHsExpr GhcTc
</span><a href="GHC.Hs.Utils.html#nlHsSyntaxApps"><span class="hs-identifier hs-var">nlHsSyntaxApps</span></a></span><span> </span><span class="annot"><span class="annottext">SyntaxExpr GhcTc
SyntaxExprTc
</span><a href="#local-6989586621681140901"><span class="hs-identifier hs-var">return_op</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">[LHsExpr GhcTc] -&gt; LHsExpr GhcTc
</span><a href="GHC.HsToCore.Utils.html#mkBigLHsTupId"><span class="hs-identifier hs-var">mkBigLHsTupId</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsExpr GhcTc]
</span><a href="#local-6989586621681140876"><span class="hs-identifier hs-var">rets</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1114"></span><span>        </span><span id="local-6989586621681140869"><span class="annot"><span class="annottext">ret_stmt :: ExprLStmt GhcTc
</span><a href="#local-6989586621681140869"><span class="hs-identifier hs-var hs-var">ret_stmt</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">StmtLR GhcTc GhcTc (LHsExpr GhcTc) -&gt; ExprLStmt GhcTc
forall e. e -&gt; Located e
</span><a href="GHC.Types.SrcLoc.html#noLoc"><span class="hs-identifier hs-var">noLoc</span></a></span><span> </span><span class="annot"><span class="annottext">(StmtLR GhcTc GhcTc (LHsExpr GhcTc) -&gt; ExprLStmt GhcTc)
-&gt; StmtLR GhcTc GhcTc (LHsExpr GhcTc) -&gt; ExprLStmt GhcTc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; StmtLR GhcTc GhcTc (LHsExpr GhcTc)
forall (idR :: Pass) (bodyR :: * -&gt; *) (idL :: Pass).
IsPass idR =&gt;
Located (bodyR (GhcPass idR))
-&gt; StmtLR
     (GhcPass idL) (GhcPass idR) (Located (bodyR (GhcPass idR)))
</span><a href="GHC.Hs.Utils.html#mkLastStmt"><span class="hs-identifier hs-var">mkLastStmt</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140868"><span class="hs-identifier hs-var">ret_app</span></a></span><span>
</span><span id="line-1115"></span><span>                     </span><span class="hs-comment">-- This LastStmt will be desugared with dsDo,</span><span>
</span><span id="line-1116"></span><span>                     </span><span class="hs-comment">-- which ignores the return_op in the LastStmt,</span><span>
</span><span id="line-1117"></span><span>                     </span><span class="hs-comment">-- so we must apply the return_op explicitly</span><span>
</span><span id="line-1118"></span><span>
</span><span id="line-1119"></span><span>    </span><span class="annot"><a href="#local-6989586621681140980"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#ParStmt"><span class="hs-identifier hs-type">ParStmt</span></a></span><span>   </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; DsM CoreExpr
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dsDo ParStmt&quot;</span></span><span>
</span><span id="line-1120"></span><span>    </span><span class="annot"><a href="#local-6989586621681140980"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#TransStmt"><span class="hs-identifier hs-type">TransStmt</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[ExprLStmt GhcTc]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; DsM CoreExpr
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dsDo TransStmt&quot;</span></span><span>
</span><span id="line-1121"></span><span>
</span><span id="line-1122"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsHandleMonadicFailure"><span class="hs-identifier hs-type">dsHandleMonadicFailure</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.HsToCore.Monad.html#MatchResult"><span class="hs-identifier hs-type">MatchResult</span></a></span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#FailOperator"><span class="hs-identifier hs-type">FailOperator</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#DsM"><span class="hs-identifier hs-type">DsM</span></a></span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span>
</span><span id="line-1123"></span><span>    </span><span class="hs-comment">-- In a do expression, pattern-match failure just calls</span><span>
</span><span id="line-1124"></span><span>    </span><span class="hs-comment">-- the monadic 'fail' rather than throwing an exception</span><span>
</span><span id="line-1125"></span><span id="dsHandleMonadicFailure"><span class="annot"><span class="annottext">dsHandleMonadicFailure :: LPat GhcTc
-&gt; MatchResult CoreExpr -&gt; Maybe (SyntaxExpr GhcTc) -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsHandleMonadicFailure"><span class="hs-identifier hs-var hs-var">dsHandleMonadicFailure</span></a></span></span><span> </span><span id="local-6989586621681140863"><span class="annot"><span class="annottext">LPat GhcTc
</span><a href="#local-6989586621681140863"><span class="hs-identifier hs-var">pat</span></a></span></span><span> </span><span id="local-6989586621681140862"><span class="annot"><span class="annottext">MatchResult CoreExpr
</span><a href="#local-6989586621681140862"><span class="hs-identifier hs-var">match</span></a></span></span><span> </span><span id="local-6989586621681140861"><span class="annot"><span class="annottext">Maybe (SyntaxExpr GhcTc)
</span><a href="#local-6989586621681140861"><span class="hs-identifier hs-var">m_fail_op</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1126"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MatchResult CoreExpr -&gt; MatchResult CoreExpr
</span><a href="GHC.HsToCore.Utils.html#shareFailureHandler"><span class="hs-identifier hs-var">shareFailureHandler</span></a></span><span> </span><span class="annot"><span class="annottext">MatchResult CoreExpr
</span><a href="#local-6989586621681140862"><span class="hs-identifier hs-var">match</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1127"></span><span>    </span><span class="annot"><a href="GHC.HsToCore.Monad.html#MR_Infallible"><span class="hs-identifier hs-type">MR_Infallible</span></a></span><span> </span><span id="local-6989586621681140858"><span class="annot"><span class="annottext">DsM CoreExpr
</span><a href="#local-6989586621681140858"><span class="hs-identifier hs-var">body</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">DsM CoreExpr
</span><a href="#local-6989586621681140858"><span class="hs-identifier hs-var">body</span></a></span><span>
</span><span id="line-1128"></span><span>    </span><span class="annot"><a href="GHC.HsToCore.Monad.html#MR_Fallible"><span class="hs-identifier hs-type">MR_Fallible</span></a></span><span> </span><span id="local-6989586621681140856"><span class="annot"><span class="annottext">CoreExpr -&gt; DsM CoreExpr
</span><a href="#local-6989586621681140856"><span class="hs-identifier hs-var">body</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1129"></span><span>      </span><span id="local-6989586621681140855"><span class="annot"><span class="annottext">SyntaxExprTc
</span><a href="#local-6989586621681140855"><span class="hs-identifier hs-var">fail_op</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe (SyntaxExpr GhcTc)
</span><a href="#local-6989586621681140861"><span class="hs-identifier hs-var">m_fail_op</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1130"></span><span>        </span><span class="hs-comment">-- Note that (non-monadic) list comprehension, pattern guards, etc could</span><span>
</span><span id="line-1131"></span><span>        </span><span class="hs-comment">-- have fallible bindings without an explicit failure op, but this is</span><span>
</span><span id="line-1132"></span><span>        </span><span class="hs-comment">-- handled elsewhere. See Note [Failing pattern matches in Stmts] the</span><span>
</span><span id="line-1133"></span><span>        </span><span class="hs-comment">-- breakdown of regular and special binds.</span><span>
</span><span id="line-1134"></span><span>        </span><span class="annot"><span class="annottext">Maybe (SyntaxExpr GhcTc)
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; IOEnv (Env DsGblEnv DsLclEnv) SyntaxExprTc
forall a. HasCallStack =&gt; String -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;missing fail op&quot;</span></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; IOEnv (Env DsGblEnv DsLclEnv) SyntaxExprTc)
-&gt; SDoc -&gt; IOEnv (Env DsGblEnv DsLclEnv) SyntaxExprTc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1135"></span><span>          </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Pattern match:&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Pat GhcTc) -&gt; SDoc
forall {a}. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Pat GhcTc)
LPat GhcTc
</span><a href="#local-6989586621681140863"><span class="hs-identifier hs-var">pat</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span>
</span><span id="line-1136"></span><span>          </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;is failable, and fail_expr was left unset&quot;</span></span><span>
</span><span id="line-1137"></span><span>        </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681140854"><span class="annot"><span class="annottext">SyntaxExpr GhcTc
</span><a href="#local-6989586621681140854"><span class="hs-identifier hs-var">fail_op</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SyntaxExprTc -&gt; IOEnv (Env DsGblEnv DsLclEnv) SyntaxExprTc
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">SyntaxExpr GhcTc
SyntaxExprTc
</span><a href="#local-6989586621681140854"><span class="hs-identifier hs-var">fail_op</span></a></span><span>
</span><span id="line-1138"></span><span>      </span><span id="local-6989586621681140853"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681140853"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env DsGblEnv DsLclEnv) DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-1139"></span><span>      </span><span id="local-6989586621681140852"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140852"><span class="hs-identifier hs-var">fail_msg</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; DsM CoreExpr
forall (m :: * -&gt; *). MonadThings m =&gt; String -&gt; m CoreExpr
</span><a href="GHC.Core.Make.html#mkStringExpr"><span class="hs-identifier hs-var">mkStringExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; Located (Pat GhcTc) -&gt; String
forall e. DynFlags -&gt; Located e -&gt; String
</span><a href="GHC.HsToCore.Expr.html#mk_fail_msg"><span class="hs-identifier hs-var">mk_fail_msg</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681140853"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Pat GhcTc)
LPat GhcTc
</span><a href="#local-6989586621681140863"><span class="hs-identifier hs-var">pat</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1140"></span><span>      </span><span id="local-6989586621681140849"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140849"><span class="hs-identifier hs-var">fail_expr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">SyntaxExpr GhcTc -&gt; [CoreExpr] -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsSyntaxExpr"><span class="hs-identifier hs-var">dsSyntaxExpr</span></a></span><span> </span><span class="annot"><span class="annottext">SyntaxExpr GhcTc
SyntaxExprTc
</span><a href="#local-6989586621681140855"><span class="hs-identifier hs-var">fail_op</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140852"><span class="hs-identifier hs-var">fail_msg</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1141"></span><span>      </span><span class="annot"><span class="annottext">CoreExpr -&gt; DsM CoreExpr
</span><a href="#local-6989586621681140856"><span class="hs-identifier hs-var">body</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140849"><span class="hs-identifier hs-var">fail_expr</span></a></span><span>
</span><span id="line-1142"></span><span>
</span><span id="line-1143"></span><span id="local-6989586621681142069"><span class="annot"><a href="GHC.HsToCore.Expr.html#mk_fail_msg"><span class="hs-identifier hs-type">mk_fail_msg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681142069"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span></span><span>
</span><span id="line-1144"></span><span id="mk_fail_msg"><span class="annot"><span class="annottext">mk_fail_msg :: forall e. DynFlags -&gt; Located e -&gt; String
</span><a href="GHC.HsToCore.Expr.html#mk_fail_msg"><span class="hs-identifier hs-var hs-var">mk_fail_msg</span></a></span></span><span> </span><span id="local-6989586621681140847"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681140847"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681140846"><span class="annot"><span class="annottext">Located e
</span><a href="#local-6989586621681140846"><span class="hs-identifier hs-var">pat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Pattern match failure in do expression at &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-1145"></span><span>                         </span><span class="annot"><span class="annottext">DynFlags -&gt; SrcSpan -&gt; String
forall a. Outputable a =&gt; DynFlags -&gt; a -&gt; String
</span><a href="GHC.Utils.Outputable.html#showPpr"><span class="hs-identifier hs-var">showPpr</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681140847"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Located e -&gt; SrcSpan
forall l e. GenLocated l e -&gt; l
</span><a href="GHC.Types.SrcLoc.html#getLoc"><span class="hs-identifier hs-var">getLoc</span></a></span><span> </span><span class="annot"><span class="annottext">Located e
</span><a href="#local-6989586621681140846"><span class="hs-identifier hs-var">pat</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1146"></span><span>
</span><span id="line-1147"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
   Desugaring Variables
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-1154"></span><span>
</span><span id="line-1155"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsHsVar"><span class="hs-identifier hs-type">dsHsVar</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#DsM"><span class="hs-identifier hs-type">DsM</span></a></span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span>
</span><span id="line-1156"></span><span id="dsHsVar"><span class="annot"><span class="annottext">dsHsVar :: Id -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsHsVar"><span class="hs-identifier hs-var hs-var">dsHsVar</span></a></span></span><span> </span><span id="local-6989586621681140844"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681140844"><span class="hs-identifier hs-var">var</span></a></span></span><span>
</span><span id="line-1157"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; Id -&gt; Type -&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
</span><a href="GHC.HsToCore.Expr.html#checkLevPolyFunction"><span class="hs-identifier hs-var">checkLevPolyFunction</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; SDoc
forall {a}. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681140844"><span class="hs-identifier hs-var">var</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681140844"><span class="hs-identifier hs-var">var</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Type
</span><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-var">idType</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681140844"><span class="hs-identifier hs-var">var</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1158"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; DsM CoreExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; CoreExpr
forall b. Id -&gt; Expr b
</span><a href="GHC.Core.html#varToCoreExpr"><span class="hs-identifier hs-var">varToCoreExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681140844"><span class="hs-identifier hs-var">var</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>   </span><span class="hs-comment">-- See Note [Desugaring vars]</span><span>
</span><span id="line-1159"></span><span>
</span><span id="line-1160"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsConLike"><span class="hs-identifier hs-type">dsConLike</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.ConLike.html#ConLike"><span class="hs-identifier hs-type">ConLike</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#DsM"><span class="hs-identifier hs-type">DsM</span></a></span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span>
</span><span id="line-1161"></span><span id="dsConLike"><span class="annot"><span class="annottext">dsConLike :: ConLike -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsConLike"><span class="hs-identifier hs-var hs-var">dsConLike</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.ConLike.html#RealDataCon"><span class="hs-identifier hs-type">RealDataCon</span></a></span><span> </span><span id="local-6989586621681140841"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681140841"><span class="hs-identifier hs-var">dc</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsHsVar"><span class="hs-identifier hs-var">dsHsVar</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; Id
</span><a href="GHC.Core.DataCon.html#dataConWrapId"><span class="hs-identifier hs-var">dataConWrapId</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681140841"><span class="hs-identifier hs-var">dc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1162"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsConLike"><span class="hs-identifier hs-var">dsConLike</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.ConLike.html#PatSynCon"><span class="hs-identifier hs-type">PatSynCon</span></a></span><span> </span><span id="local-6989586621681140839"><span class="annot"><span class="annottext">PatSyn
</span><a href="#local-6989586621681140839"><span class="hs-identifier hs-var">ps</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; DsM CoreExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; DsM CoreExpr) -&gt; CoreExpr -&gt; DsM CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">PatSyn -&gt; Maybe (Id, Bool)
</span><a href="GHC.Core.PatSyn.html#patSynBuilder"><span class="hs-identifier hs-var">patSynBuilder</span></a></span><span> </span><span class="annot"><span class="annottext">PatSyn
</span><a href="#local-6989586621681140839"><span class="hs-identifier hs-var">ps</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1163"></span><span>  </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681140837"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681140837"><span class="hs-identifier hs-var">id</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681140836"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681140836"><span class="hs-identifier hs-var">add_void</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-1164"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681140836"><span class="hs-identifier hs-var">add_void</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; CoreExpr -&gt; CoreExpr -&gt; CoreExpr
</span><a href="GHC.Core.Make.html#mkCoreApp"><span class="hs-identifier hs-var">mkCoreApp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dsConLike&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">PatSyn -&gt; SDoc
forall {a}. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">PatSyn
</span><a href="#local-6989586621681140839"><span class="hs-identifier hs-var">ps</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; CoreExpr
forall b. Id -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681140837"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; CoreExpr
forall b. Id -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="GHC.Types.Id.Make.html#voidPrimId"><span class="hs-identifier hs-var">voidPrimId</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1165"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Id -&gt; CoreExpr
forall b. Id -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681140837"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-1166"></span><span>  </span><span class="annot"><span class="annottext">Maybe (Id, Bool)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; CoreExpr
forall a. HasCallStack =&gt; String -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dsConLike&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PatSyn -&gt; SDoc
forall {a}. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">PatSyn
</span><a href="#local-6989586621681140839"><span class="hs-identifier hs-var">ps</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1167"></span><span>
</span><span id="line-1168"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection{Errors and contexts}
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-1175"></span><span>
</span><span id="line-1176"></span><span class="hs-comment">-- Warn about certain types of values discarded in monadic bindings (#3263)</span><span>
</span><span id="line-1177"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#warnDiscardedDoBindings"><span class="hs-identifier hs-type">warnDiscardedDoBindings</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#LHsExpr"><span class="hs-identifier hs-type">LHsExpr</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#DsM"><span class="hs-identifier hs-type">DsM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-1178"></span><span id="warnDiscardedDoBindings"><span class="annot"><span class="annottext">warnDiscardedDoBindings :: LHsExpr GhcTc -&gt; Type -&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
</span><a href="GHC.HsToCore.Expr.html#warnDiscardedDoBindings"><span class="hs-identifier hs-var hs-var">warnDiscardedDoBindings</span></a></span></span><span> </span><span id="local-6989586621681140833"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140833"><span class="hs-identifier hs-var">rhs</span></a></span></span><span> </span><span id="local-6989586621681140832"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681140832"><span class="hs-identifier hs-var">rhs_ty</span></a></span></span><span>
</span><span id="line-1179"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681140831"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681140831"><span class="hs-identifier hs-var">m_ty</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681140830"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681140830"><span class="hs-identifier hs-var">elt_ty</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Type -&gt; Maybe (Type, Type)
</span><a href="GHC.Tc.Utils.TcType.html#tcSplitAppTy_maybe"><span class="hs-identifier hs-var">tcSplitAppTy_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681140832"><span class="hs-identifier hs-var">rhs_ty</span></a></span><span>
</span><span id="line-1180"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681140828"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681140828"><span class="hs-identifier hs-var">warn_unused</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">WarningFlag -&gt; TcRnIf DsGblEnv DsLclEnv Bool
forall gbl lcl. WarningFlag -&gt; TcRnIf gbl lcl Bool
</span><a href="GHC.Tc.Utils.Monad.html#woptM"><span class="hs-identifier hs-var">woptM</span></a></span><span> </span><span class="annot"><span class="annottext">WarningFlag
</span><a href="GHC.Driver.Flags.html#Opt_WarnUnusedDoBind"><span class="hs-identifier hs-var">Opt_WarnUnusedDoBind</span></a></span><span>
</span><span id="line-1181"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681140825"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681140825"><span class="hs-identifier hs-var">warn_wrong</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">WarningFlag -&gt; TcRnIf DsGblEnv DsLclEnv Bool
forall gbl lcl. WarningFlag -&gt; TcRnIf gbl lcl Bool
</span><a href="GHC.Tc.Utils.Monad.html#woptM"><span class="hs-identifier hs-var">woptM</span></a></span><span> </span><span class="annot"><span class="annottext">WarningFlag
</span><a href="GHC.Driver.Flags.html#Opt_WarnWrongDoBind"><span class="hs-identifier hs-var">Opt_WarnWrongDoBind</span></a></span><span>
</span><span id="line-1182"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Bool
-&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
-&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681140828"><span class="hs-identifier hs-var">warn_unused</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681140825"><span class="hs-identifier hs-var">warn_wrong</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IOEnv (Env DsGblEnv DsLclEnv) ()
 -&gt; IOEnv (Env DsGblEnv DsLclEnv) ())
-&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
-&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1183"></span><span>    </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681140823"><span class="annot"><span class="annottext">FamInstEnvs
</span><a href="#local-6989586621681140823"><span class="hs-identifier hs-var">fam_inst_envs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">DsM FamInstEnvs
</span><a href="GHC.HsToCore.Monad.html#dsGetFamInstEnvs"><span class="hs-identifier hs-var">dsGetFamInstEnvs</span></a></span><span>
</span><span id="line-1184"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681140822"><span class="annot"><span class="annottext">norm_elt_ty :: Type
</span><a href="#local-6989586621681140822"><span class="hs-identifier hs-var hs-var">norm_elt_ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FamInstEnvs -&gt; Type -&gt; Type
</span><a href="GHC.Core.FamInstEnv.html#topNormaliseType"><span class="hs-identifier hs-var">topNormaliseType</span></a></span><span> </span><span class="annot"><span class="annottext">FamInstEnvs
</span><a href="#local-6989586621681140823"><span class="hs-identifier hs-var">fam_inst_envs</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681140830"><span class="hs-identifier hs-var">elt_ty</span></a></span><span>
</span><span id="line-1185"></span><span>
</span><span id="line-1186"></span><span>           </span><span class="hs-comment">-- Warn about discarding non-() things in 'monadic' binding</span><span>
</span><span id="line-1187"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681140828"><span class="hs-identifier hs-var">warn_unused</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; Bool
</span><a href="GHC.Tc.Utils.TcType.html#isUnitTy"><span class="hs-identifier hs-var">isUnitTy</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681140822"><span class="hs-identifier hs-var">norm_elt_ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1188"></span><span>         </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">WarnReason -&gt; SDoc -&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
</span><a href="GHC.HsToCore.Monad.html#warnDs"><span class="hs-identifier hs-var">warnDs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WarningFlag -&gt; WarnReason
</span><a href="GHC.Driver.Flags.html#Reason"><span class="hs-identifier hs-var">Reason</span></a></span><span> </span><span class="annot"><span class="annottext">WarningFlag
</span><a href="GHC.Driver.Flags.html#Opt_WarnUnusedDoBind"><span class="hs-identifier hs-var">Opt_WarnUnusedDoBind</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1189"></span><span>                     </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; Type -&gt; SDoc
</span><a href="GHC.HsToCore.Expr.html#badMonadBind"><span class="hs-identifier hs-var">badMonadBind</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140833"><span class="hs-identifier hs-var">rhs</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681140830"><span class="hs-identifier hs-var">elt_ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1190"></span><span>         </span><span class="hs-keyword">else</span><span>
</span><span id="line-1191"></span><span>
</span><span id="line-1192"></span><span>           </span><span class="hs-comment">-- Warn about discarding m a things in 'monadic' binding of the same type,</span><span>
</span><span id="line-1193"></span><span>           </span><span class="hs-comment">-- but only if we didn't already warn due to Opt_WarnUnusedDoBind</span><span>
</span><span id="line-1194"></span><span>           </span><span class="annot"><span class="annottext">Bool
-&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
-&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681140825"><span class="hs-identifier hs-var">warn_wrong</span></a></span><span> </span><span class="annot"><span class="annottext">(IOEnv (Env DsGblEnv DsLclEnv) ()
 -&gt; IOEnv (Env DsGblEnv DsLclEnv) ())
-&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
-&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1195"></span><span>                </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Type -&gt; Maybe (Type, Type)
</span><a href="GHC.Tc.Utils.TcType.html#tcSplitAppTy_maybe"><span class="hs-identifier hs-var">tcSplitAppTy_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681140822"><span class="hs-identifier hs-var">norm_elt_ty</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1196"></span><span>                         </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681140817"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681140817"><span class="hs-identifier hs-var">elt_m_ty</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>
</span><span id="line-1197"></span><span>                            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681140831"><span class="hs-identifier hs-var">m_ty</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; Type -&gt; Bool
</span><a href="GHC.Core.Type.html#eqType"><span class="hs-operator hs-var">`eqType`</span></a></span><span> </span><span class="annot"><span class="annottext">FamInstEnvs -&gt; Type -&gt; Type
</span><a href="GHC.Core.FamInstEnv.html#topNormaliseType"><span class="hs-identifier hs-var">topNormaliseType</span></a></span><span> </span><span class="annot"><span class="annottext">FamInstEnvs
</span><a href="#local-6989586621681140823"><span class="hs-identifier hs-var">fam_inst_envs</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681140817"><span class="hs-identifier hs-var">elt_m_ty</span></a></span><span>
</span><span id="line-1198"></span><span>                            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">WarnReason -&gt; SDoc -&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
</span><a href="GHC.HsToCore.Monad.html#warnDs"><span class="hs-identifier hs-var">warnDs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WarningFlag -&gt; WarnReason
</span><a href="GHC.Driver.Flags.html#Reason"><span class="hs-identifier hs-var">Reason</span></a></span><span> </span><span class="annot"><span class="annottext">WarningFlag
</span><a href="GHC.Driver.Flags.html#Opt_WarnWrongDoBind"><span class="hs-identifier hs-var">Opt_WarnWrongDoBind</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1199"></span><span>                                      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; Type -&gt; SDoc
</span><a href="GHC.HsToCore.Expr.html#badMonadBind"><span class="hs-identifier hs-var">badMonadBind</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140833"><span class="hs-identifier hs-var">rhs</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681140830"><span class="hs-identifier hs-var">elt_ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1200"></span><span>                         </span><span class="annot"><span class="annottext">Maybe (Type, Type)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">() -&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1201"></span><span>
</span><span id="line-1202"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>   </span><span class="hs-comment">-- RHS does have type of form (m ty), which is weird</span><span>
</span><span id="line-1203"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>   </span><span class="hs-comment">-- but at least this warning is irrelevant</span><span>
</span><span id="line-1204"></span><span>
</span><span id="line-1205"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#badMonadBind"><span class="hs-identifier hs-type">badMonadBind</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#LHsExpr"><span class="hs-identifier hs-type">LHsExpr</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-1206"></span><span id="badMonadBind"><span class="annot"><span class="annottext">badMonadBind :: LHsExpr GhcTc -&gt; Type -&gt; SDoc
</span><a href="GHC.HsToCore.Expr.html#badMonadBind"><span class="hs-identifier hs-var hs-var">badMonadBind</span></a></span></span><span> </span><span id="local-6989586621681140816"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140816"><span class="hs-identifier hs-var">rhs</span></a></span></span><span> </span><span id="local-6989586621681140815"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681140815"><span class="hs-identifier hs-var">elt_ty</span></a></span></span><span>
</span><span id="line-1207"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; Int -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;A do-notation statement discarded a result of type&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-1208"></span><span>              </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; SDoc
forall {a}. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681140815"><span class="hs-identifier hs-var">elt_ty</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1209"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; Int -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Suppress this warning by saying&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-1210"></span><span>              </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; SDoc) -&gt; SDoc -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;_ &lt;-&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc -&gt; SDoc
forall {a}. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140816"><span class="hs-identifier hs-var">rhs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1211"></span><span>         </span><span class="hs-special">]</span><span>
</span><span id="line-1212"></span><span>
</span><span id="line-1213"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
            Levity polymorphism checks
*                                                                      *
************************************************************************

Note [Checking for levity-polymorphic functions]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We cannot have levity polymorphic function arguments. See
Note [Levity polymorphism invariants] in GHC.Core. That is
checked by dsLExprNoLP.

But what about
  const True (unsafeCoerce# :: forall r1 r2 (a :: TYPE r1) (b :: TYPE r2). a -&gt; b)

Since `unsafeCoerce#` has no binding, it has a compulsory unfolding.
But that compulsory unfolding is a levity-polymorphic lambda, which
is no good.  So we want to reject this.  On the other hand
  const True (unsafeCoerce# @LiftedRep @UnliftedRep)
is absolutely fine.

We have to collect all the type-instantiation and *then* check.  That
is what dsHsWrapped does.  Because we might have an HsVar without a
wrapper, we check in dsHsVar as well. typecheck/should_fail/T17021
triggers this case.

Note that if `f :: forall r (a :: Type r). blah`, then
   const True f
is absolutely fine.  Here `f` is a function, represented by a
pointer, and we can pass it to `const` (or anything else).  (See
#12708 for an example.)  It's only the Id.hasNoBinding functions
that are a problem.

Interestingly, this approach does not look to see whether the Id in
question will be eta expanded. The logic is this:
  * Either the Id in question is saturated or not.
  * If it is, then it surely can't have levity polymorphic arguments.
    If its wrapped type contains levity polymorphic arguments, reject.
  * If it's not, then it can't be eta expanded with levity polymorphic
    argument. If its wrapped type contains levity polymorphic arguments, reject.
So, either way, we're good to reject.

-}</span><span>
</span><span id="line-1257"></span><span>
</span><span id="line-1258"></span><span class="hs-comment">------------------------------</span><span>
</span><span id="line-1259"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#dsHsWrapped"><span class="hs-identifier hs-type">dsHsWrapped</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#HsExpr"><span class="hs-identifier hs-type">HsExpr</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcTc"><span class="hs-identifier hs-type">GhcTc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#DsM"><span class="hs-identifier hs-type">DsM</span></a></span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span>
</span><span id="line-1260"></span><span class="hs-comment">-- Looks for a function 'f' wrapped in type applications (HsAppType)</span><span>
</span><span id="line-1261"></span><span class="hs-comment">-- or wrappers (HsWrap), and checks that any hasNoBinding function</span><span>
</span><span id="line-1262"></span><span class="hs-comment">-- is not levity polymorphic, *after* instantiation with those wrappers</span><span>
</span><span id="line-1263"></span><span id="dsHsWrapped"><span class="annot"><span class="annottext">dsHsWrapped :: HsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsHsWrapped"><span class="hs-identifier hs-var hs-var">dsHsWrapped</span></a></span></span><span> </span><span id="local-6989586621681140814"><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681140814"><span class="hs-identifier hs-var">orig_hs_expr</span></a></span></span><span>
</span><span id="line-1264"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; CoreExpr) -&gt; HsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="#local-6989586621681140813"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExpr
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681140814"><span class="hs-identifier hs-var">orig_hs_expr</span></a></span><span>
</span><span id="line-1265"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1266"></span><span>    </span><span id="local-6989586621681140813"><span class="annot"><span class="annottext">go :: (CoreExpr -&gt; CoreExpr) -&gt; HsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="#local-6989586621681140813"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621681140811"><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621681140811"><span class="hs-identifier hs-var">wrap</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#XExpr"><span class="hs-identifier hs-type">XExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#WrapExpr"><span class="hs-identifier hs-type">WrapExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsWrap"><span class="hs-identifier hs-type">HsWrap</span></a></span><span> </span><span id="local-6989586621681140809"><span class="annot"><span class="annottext">HsWrapper
</span><a href="#local-6989586621681140809"><span class="hs-identifier hs-var">co_fn</span></a></span></span><span> </span><span id="local-6989586621681140808"><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681140808"><span class="hs-identifier hs-var">hs_e</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1267"></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681140807"><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621681140807"><span class="hs-identifier hs-var">wrap'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HsWrapper -&gt; IOEnv (Env DsGblEnv DsLclEnv) (CoreExpr -&gt; CoreExpr)
</span><a href="GHC.HsToCore.Binds.html#dsHsWrapper"><span class="hs-identifier hs-var">dsHsWrapper</span></a></span><span> </span><span class="annot"><span class="annottext">HsWrapper
</span><a href="#local-6989586621681140809"><span class="hs-identifier hs-var">co_fn</span></a></span><span>
</span><span id="line-1268"></span><span>            </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Origin -&gt; Bag Id -&gt; DsM CoreExpr -&gt; DsM CoreExpr
forall a. Origin -&gt; Bag Id -&gt; DsM a -&gt; DsM a
</span><a href="GHC.HsToCore.PmCheck.html#addTyCsDs"><span class="hs-identifier hs-var">addTyCsDs</span></a></span><span> </span><span class="annot"><span class="annottext">Origin
</span><a href="GHC.Types.Basic.html#FromSource"><span class="hs-identifier hs-var">FromSource</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsWrapper -&gt; Bag Id
</span><a href="GHC.Tc.Types.Evidence.html#hsWrapDictBinders"><span class="hs-identifier hs-var">hsWrapDictBinders</span></a></span><span> </span><span class="annot"><span class="annottext">HsWrapper
</span><a href="#local-6989586621681140809"><span class="hs-identifier hs-var">co_fn</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(DsM CoreExpr -&gt; DsM CoreExpr) -&gt; DsM CoreExpr -&gt; DsM CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1269"></span><span>              </span><span class="annot"><span class="annottext">(CoreExpr -&gt; CoreExpr) -&gt; HsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="#local-6989586621681140813"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621681140811"><span class="hs-identifier hs-var">wrap</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; CoreExpr)
-&gt; (CoreExpr -&gt; CoreExpr) -&gt; CoreExpr -&gt; CoreExpr
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621681140807"><span class="hs-identifier hs-var">wrap'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681140808"><span class="hs-identifier hs-var">hs_e</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1270"></span><span>    </span><span class="annot"><a href="#local-6989586621681140813"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621681140805"><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621681140805"><span class="hs-identifier hs-var">wrap</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsConLikeOut"><span class="hs-identifier hs-type">HsConLikeOut</span></a></span><span> </span><span class="annot"><span class="annottext">XConLikeOut GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.ConLike.html#RealDataCon"><span class="hs-identifier hs-type">RealDataCon</span></a></span><span> </span><span id="local-6989586621681140804"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681140804"><span class="hs-identifier hs-var">dc</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1271"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; CoreExpr) -&gt; Id -&gt; DsM CoreExpr
</span><a href="#local-6989586621681140803"><span class="hs-identifier hs-var">go_head</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621681140805"><span class="hs-identifier hs-var">wrap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; Id
</span><a href="GHC.Core.DataCon.html#dataConWrapId"><span class="hs-identifier hs-var">dataConWrapId</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681140804"><span class="hs-identifier hs-var">dc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1272"></span><span>    </span><span class="annot"><a href="#local-6989586621681140813"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621681140802"><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621681140802"><span class="hs-identifier hs-var">wrap</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsAppType"><span class="hs-identifier hs-type">HsAppType</span></a></span><span> </span><span id="local-6989586621681140801"><span class="annot"><span class="annottext">XAppTypeE GhcTc
</span><a href="#local-6989586621681140801"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span id="local-6989586621681140800"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140800"><span class="hs-identifier hs-var">hs_e</span></a></span></span><span> </span><span class="annot"><span class="annottext">LHsWcType (NoGhcTc GhcTc)
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; CoreExpr) -&gt; LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="#local-6989586621681140799"><span class="hs-identifier hs-var">go_l</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621681140802"><span class="hs-identifier hs-var">wrap</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; CoreExpr)
-&gt; (CoreExpr -&gt; CoreExpr) -&gt; CoreExpr -&gt; CoreExpr
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681140798"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140798"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExpr -&gt; CoreExpr
forall b. Expr b -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#App"><span class="hs-identifier hs-var">App</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140798"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; CoreExpr
forall b. Type -&gt; Expr b
</span><a href="GHC.Core.html#Type"><span class="hs-identifier hs-var">Type</span></a></span><span> </span><span class="annot"><span class="annottext">Type
XAppTypeE GhcTc
</span><a href="#local-6989586621681140801"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140800"><span class="hs-identifier hs-var">hs_e</span></a></span><span>
</span><span id="line-1273"></span><span>    </span><span class="annot"><a href="#local-6989586621681140813"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621681140797"><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621681140797"><span class="hs-identifier hs-var">wrap</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsPar"><span class="hs-identifier hs-type">HsPar</span></a></span><span> </span><span class="annot"><span class="annottext">XPar GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681140796"><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140796"><span class="hs-identifier hs-var">hs_e</span></a></span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; CoreExpr) -&gt; LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="#local-6989586621681140799"><span class="hs-identifier hs-var">go_l</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621681140797"><span class="hs-identifier hs-var">wrap</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcTc
</span><a href="#local-6989586621681140796"><span class="hs-identifier hs-var">hs_e</span></a></span><span>
</span><span id="line-1274"></span><span>    </span><span class="annot"><a href="#local-6989586621681140813"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621681140795"><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621681140795"><span class="hs-identifier hs-var">wrap</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsVar"><span class="hs-identifier hs-type">HsVar</span></a></span><span> </span><span class="annot"><span class="annottext">XVar GhcTc
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681140794"><span class="annot"><span class="annottext">IdP GhcTc
</span><a href="#local-6989586621681140794"><span class="hs-identifier hs-var">var</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; CoreExpr) -&gt; Id -&gt; DsM CoreExpr
</span><a href="#local-6989586621681140803"><span class="hs-identifier hs-var">go_head</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621681140795"><span class="hs-identifier hs-var">wrap</span></a></span><span> </span><span class="annot"><span class="annottext">Id
IdP GhcTc
</span><a href="#local-6989586621681140794"><span class="hs-identifier hs-var">var</span></a></span><span>
</span><span id="line-1275"></span><span>    </span><span class="annot"><a href="#local-6989586621681140813"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621681140793"><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621681140793"><span class="hs-identifier hs-var">wrap</span></a></span></span><span> </span><span id="local-6989586621681140792"><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681140792"><span class="hs-identifier hs-var">hs_e</span></a></span></span><span>                  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681140791"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140791"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="GHC.HsToCore.Expr.html#dsExpr"><span class="hs-identifier hs-var">dsExpr</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681140792"><span class="hs-identifier hs-var">hs_e</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; DsM CoreExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621681140793"><span class="hs-identifier hs-var">wrap</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140791"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1276"></span><span>
</span><span id="line-1277"></span><span>    </span><span id="local-6989586621681140799"><span class="annot"><span class="annottext">go_l :: (CoreExpr -&gt; CoreExpr) -&gt; LHsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="#local-6989586621681140799"><span class="hs-identifier hs-var hs-var">go_l</span></a></span></span><span> </span><span id="local-6989586621681140790"><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621681140790"><span class="hs-identifier hs-var">wrap</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681140789"><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681140789"><span class="hs-identifier hs-var">hs_e</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; CoreExpr) -&gt; HsExpr GhcTc -&gt; DsM CoreExpr
</span><a href="#local-6989586621681140813"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621681140790"><span class="hs-identifier hs-var">wrap</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681140789"><span class="hs-identifier hs-var">hs_e</span></a></span><span>
</span><span id="line-1278"></span><span>
</span><span id="line-1279"></span><span>    </span><span id="local-6989586621681140803"><span class="annot"><span class="annottext">go_head :: (CoreExpr -&gt; CoreExpr) -&gt; Id -&gt; DsM CoreExpr
</span><a href="#local-6989586621681140803"><span class="hs-identifier hs-var hs-var">go_head</span></a></span></span><span> </span><span id="local-6989586621681140788"><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621681140788"><span class="hs-identifier hs-var">wrap</span></a></span></span><span> </span><span id="local-6989586621681140787"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681140787"><span class="hs-identifier hs-var">var</span></a></span></span><span>
</span><span id="line-1280"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681140786"><span class="annot"><span class="annottext">wrapped_e :: CoreExpr
</span><a href="#local-6989586621681140786"><span class="hs-identifier hs-var hs-var">wrapped_e</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621681140788"><span class="hs-identifier hs-var">wrap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; CoreExpr
forall b. Id -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681140787"><span class="hs-identifier hs-var">var</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1281"></span><span>                 </span><span id="local-6989586621681140785"><span class="annot"><span class="annottext">wrapped_ty :: Type
</span><a href="#local-6989586621681140785"><span class="hs-identifier hs-var hs-var">wrapped_ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; Type
</span><a href="GHC.Core.Utils.html#exprType"><span class="hs-identifier hs-var">exprType</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140786"><span class="hs-identifier hs-var">wrapped_e</span></a></span><span>
</span><span id="line-1282"></span><span>
</span><span id="line-1283"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; Id -&gt; Type -&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
</span><a href="GHC.HsToCore.Expr.html#checkLevPolyFunction"><span class="hs-identifier hs-var">checkLevPolyFunction</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsExpr GhcTc -&gt; SDoc
forall {a}. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcTc
</span><a href="#local-6989586621681140814"><span class="hs-identifier hs-var">orig_hs_expr</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681140787"><span class="hs-identifier hs-var">var</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681140785"><span class="hs-identifier hs-var">wrapped_ty</span></a></span><span>
</span><span id="line-1284"></span><span>             </span><span class="hs-comment">-- See Note [Checking for levity-polymorphic functions]</span><span>
</span><span id="line-1285"></span><span>             </span><span class="hs-comment">-- Pass orig_hs_expr, so that the user can see entire</span><span>
</span><span id="line-1286"></span><span>             </span><span class="hs-comment">-- expression with -fprint-typechecker-elaboration</span><span>
</span><span id="line-1287"></span><span>
</span><span id="line-1288"></span><span>           </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681140784"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681140784"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env DsGblEnv DsLclEnv) DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-1289"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Id -&gt; Type -&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
</span><a href="GHC.HsToCore.Match.Literal.html#warnAboutIdentities"><span class="hs-identifier hs-var">warnAboutIdentities</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681140784"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681140787"><span class="hs-identifier hs-var">var</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681140785"><span class="hs-identifier hs-var">wrapped_ty</span></a></span><span>
</span><span id="line-1290"></span><span>
</span><span id="line-1291"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; DsM CoreExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681140786"><span class="hs-identifier hs-var">wrapped_e</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1292"></span><span>
</span><span id="line-1293"></span><span>
</span><span id="line-1294"></span><span class="hs-comment">-- | Takes a (pretty-printed) expression, a function, and its</span><span>
</span><span id="line-1295"></span><span class="hs-comment">-- instantiated type.  If the function is a hasNoBinding op, and the</span><span>
</span><span id="line-1296"></span><span class="hs-comment">-- type has levity-polymorphic arguments, issue an error.</span><span>
</span><span id="line-1297"></span><span class="hs-comment">-- Note [Checking for levity-polymorphic functions]</span><span>
</span><span id="line-1298"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#checkLevPolyFunction"><span class="hs-identifier hs-type">checkLevPolyFunction</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#DsM"><span class="hs-identifier hs-type">DsM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-1299"></span><span id="checkLevPolyFunction"><span class="annot"><span class="annottext">checkLevPolyFunction :: SDoc -&gt; Id -&gt; Type -&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
</span><a href="GHC.HsToCore.Expr.html#checkLevPolyFunction"><span class="hs-identifier hs-var hs-var">checkLevPolyFunction</span></a></span></span><span> </span><span id="local-6989586621681140782"><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681140782"><span class="hs-identifier hs-var">pp_hs_expr</span></a></span></span><span> </span><span id="local-6989586621681140781"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681140781"><span class="hs-identifier hs-var">var</span></a></span></span><span> </span><span id="local-6989586621681140780"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681140780"><span class="hs-identifier hs-var">ty</span></a></span></span><span>
</span><span id="line-1300"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681140779"><span class="annot"><span class="annottext">bad_tys :: [Type]
</span><a href="#local-6989586621681140779"><span class="hs-identifier hs-var hs-var">bad_tys</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Type -&gt; [Type]
</span><a href="GHC.HsToCore.Expr.html#isBadLevPolyFunction"><span class="hs-identifier hs-var">isBadLevPolyFunction</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681140781"><span class="hs-identifier hs-var">var</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681140780"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-1301"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Type] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621681140779"><span class="hs-identifier hs-var">bad_tys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1302"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
</span><a href="GHC.HsToCore.Monad.html#errDs"><span class="hs-identifier hs-var">errDs</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; IOEnv (Env DsGblEnv DsLclEnv) ())
-&gt; SDoc -&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span>
</span><span id="line-1303"></span><span>    </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; Int -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Cannot use function with levity-polymorphic arguments:&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-1304"></span><span>         </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681140782"><span class="hs-identifier hs-var">pp_hs_expr</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#dcolon"><span class="hs-identifier hs-var">dcolon</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; SDoc
</span><a href="GHC.Core.TyCo.Ppr.html#pprWithTYPE"><span class="hs-identifier hs-var">pprWithTYPE</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681140780"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1305"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(SDocContext -&gt; Bool) -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppUnlessOption"><span class="hs-identifier hs-var">ppUnlessOption</span></a></span><span> </span><span class="annot"><span class="annottext">SDocContext -&gt; Bool
</span><a href="GHC.Utils.Outputable.html#sdocPrintTypecheckerElaboration"><span class="hs-identifier hs-var hs-var">sdocPrintTypecheckerElaboration</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; SDoc) -&gt; SDoc -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span>
</span><span id="line-1306"></span><span>        </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;(Note that levity-polymorphic primops such as 'coerce' and unboxed tuples&quot;</span></span><span>
</span><span id="line-1307"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;are eta-expanded internally because they must occur fully saturated.&quot;</span></span><span>
</span><span id="line-1308"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Use -fprint-typechecker-elaboration to display the full expression.)&quot;</span></span><span>
</span><span id="line-1309"></span><span>        </span><span class="hs-special">]</span><span>
</span><span id="line-1310"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; Int -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Levity-polymorphic arguments:&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-1311"></span><span>         </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; SDoc) -&gt; SDoc -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc) -&gt; [SDoc] -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Type -&gt; SDoc) -&gt; [Type] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span>
</span><span id="line-1312"></span><span>           </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681140773"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681140773"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Type -&gt; SDoc
</span><a href="GHC.Core.TyCo.Ppr.html#pprWithTYPE"><span class="hs-identifier hs-var">pprWithTYPE</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681140773"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#dcolon"><span class="hs-identifier hs-var">dcolon</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; SDoc
</span><a href="GHC.Core.TyCo.Ppr.html#pprWithTYPE"><span class="hs-identifier hs-var">pprWithTYPE</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Type -&gt; Type
Type -&gt; Type
</span><a href="GHC.Core.Type.html#typeKind"><span class="hs-identifier hs-var">typeKind</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681140773"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1313"></span><span>           </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621681140779"><span class="hs-identifier hs-var">bad_tys</span></a></span><span>
</span><span id="line-1314"></span><span>    </span><span class="hs-special">]</span><span>
</span><span id="line-1315"></span><span>
</span><span id="line-1316"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#checkLevPolyFunction"><span class="hs-identifier hs-var">checkLevPolyFunction</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; IOEnv (Env DsGblEnv DsLclEnv) ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-1317"></span><span>
</span><span id="line-1318"></span><span class="hs-comment">-- | Is this a hasNoBinding Id with a levity-polymorphic type?</span><span>
</span><span id="line-1319"></span><span class="hs-comment">-- Returns the arguments that are levity polymorphic if they are bad;</span><span>
</span><span id="line-1320"></span><span class="hs-comment">-- or an empty list otherwise</span><span>
</span><span id="line-1321"></span><span class="hs-comment">-- Note [Checking for levity-polymorphic functions]</span><span>
</span><span id="line-1322"></span><span class="annot"><a href="GHC.HsToCore.Expr.html#isBadLevPolyFunction"><span class="hs-identifier hs-type">isBadLevPolyFunction</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1323"></span><span id="isBadLevPolyFunction"><span class="annot"><span class="annottext">isBadLevPolyFunction :: Id -&gt; Type -&gt; [Type]
</span><a href="GHC.HsToCore.Expr.html#isBadLevPolyFunction"><span class="hs-identifier hs-var hs-var">isBadLevPolyFunction</span></a></span></span><span> </span><span id="local-6989586621681140771"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681140771"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621681140770"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681140770"><span class="hs-identifier hs-var">ty</span></a></span></span><span>
</span><span id="line-1324"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Bool
</span><a href="GHC.Types.Id.html#hasNoBinding"><span class="hs-identifier hs-var">hasNoBinding</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681140771"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-1325"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Type -&gt; Bool) -&gt; [Type] -&gt; [Type]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; Bool
</span><a href="GHC.Core.Type.html#isTypeLevPoly"><span class="hs-identifier hs-var">isTypeLevPoly</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621681140767"><span class="hs-identifier hs-var">arg_tys</span></a></span><span>
</span><span id="line-1326"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-1327"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-1328"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1329"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621681140766"><span class="annot"><span class="annottext">[TyCoBinder]
</span><a href="#local-6989586621681140766"><span class="hs-identifier hs-var">binders</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type -&gt; ([TyCoBinder], Type)
</span><a href="GHC.Core.Type.html#splitPiTys"><span class="hs-identifier hs-var">splitPiTys</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681140770"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-1330"></span><span>    </span><span id="local-6989586621681140767"><span class="annot"><span class="annottext">arg_tys :: [Type]
</span><a href="#local-6989586621681140767"><span class="hs-identifier hs-var hs-var">arg_tys</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(TyCoBinder -&gt; Maybe Type) -&gt; [TyCoBinder] -&gt; [Type]
forall a b. (a -&gt; Maybe b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/Data.Maybe.html#mapMaybe"><span class="hs-identifier hs-var">mapMaybe</span></a></span><span> </span><span class="annot"><span class="annottext">TyCoBinder -&gt; Maybe Type
</span><a href="GHC.Core.Type.html#binderRelevantType_maybe"><span class="hs-identifier hs-var">binderRelevantType_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">[TyCoBinder]
</span><a href="#local-6989586621681140766"><span class="hs-identifier hs-var">binders</span></a></span><span>
</span><span id="line-1331"></span></pre></body></html>